若有以下程序:
#include <iostream>
using namespace std;
class Base
private:
int a,b;
public:
Base(int x, int y)
a=x;
b=y;
void show()
cout<<a<<", "<<b<<end1;
;
class Derive : public Base
private:
int c, d;
public:
Derive(int x, int y, int z,int m):Base(x,y)
c=z;
d=m;
void show()
cout<<c<<", "<<d<<end1;
;
int main ( )
Base b(50,50) ,*pb;
Derive d(10,20,30,40);
pb=&d;
pb->show );
return 0;
A.10,20
B.30,40
C.20,30
D.50,50