我有一程序老出错 请各位高手指点 小生谢过 #ifndef POINT_ #define POINT_ class point { double mX,mY; public: point(double vX=0,double vY=0){mX=vX;mY=vY;} ~point(); void setpoint(double vX=0,double vY=0); void show(); }; #endif 这hua1.h文件 #include<iostream.h> #include"hua1.h"
void point::show() { cout<<"("<<mX<<","<<mY<<")"; }; 这hua1.cpp文件 #define pi 3.1415936 #include<iostream.h> #include"hua1.h" class Circle { point mCenter; double mRadius; public: Circle(double zR=1 ); void SetCenter(point zP); void SetRadius(double zR=1); double mianji(Circle zC); void show();
}; 这hua2.h文件 #include"hua2.h" Circle::Circle(double zR=1):mCenter(1,2) { mRadius=zR; };
double Circle::mianji(Circle zC) { double mj; mj=pi*zC.mRadius*zC.mCenter; return mj; };
void Circle::show() { cout<<"fghf"; };
这hua2.cpp文件 #include"hua2.h" void main() {Circle C1(1); C1.show();
} 这主函数文件 请大家帮帮忙