#include
// using namespace std; // MS VC++ comment out the line
#include "point.h"
#include "point.cpp"
void main(){
Point A(4,5);
cout<<"Point A,"<
Point B(A);
cout<<"Point B,"<
}
--------------------------------------------
// point.cpp
int Point::count=0;
Point::Point(Point &p){
X=p.X;Y=p.Y;count++;}
----------------------------------
// point.h
class Point{
public:Point(int xx=0,int yy=0)
Point(Point &p);
~Point()
int getx()
int gety()
static void getc()
private:int X,Y;
static int count;
};
---------------------------
MS VC++ 编译通过。