高手大侠请指点迷津
以下程序是我的函授作业,我初学。实在找不出其中错误所在,高手大侠请指点迷津#include<iostream.h>
class A
{
protected:
int a;
public:
void SetData(int x) {a=x;}
int GetData() {return a; }
};
class B
{
protected:
int b;
public:
void SetData(int y) {b=y;}
int GetData() {return b; }
};
class C:public A,public B
{
public:
void SetData(int x, int y) {a=x; b=y;}
};
void main()
{
C c;
c.SetData(30,70);
cout<<"a="<<c.GetData()<<",b="<<c.GetData()<<end1;
}