非常感谢大家,帮我看下着代码
#include<iostream>using namespace std;
class CShape
{
public:
CShape();
void output(int x,int y);
~CShape();
};
CShape::CShape()
{
}
void CShape::output(int x,int y)
{
printf("%d\n",x*y);
}
CShape::~CShape()
{
}
class CCircle:public CShape
{
public:
CCircle();
void coutput(int x,int y);
~CCircle();
};
CCircle::CCircle()
{
}
void CCircle::coutput(int x,int y)
{
printf("%d\n",x+y);
}
CCircle::~CCircle()
{
}
int main()
{
CCircle pCCircle;
pCCircle.coutput(10,10);
pCCircle.output(10,10);
return 0;
}
编译可以通过,链接不行