下列程序的运行结果是()
#include <iostream> #include <cmath> using namespace std; class Point { public: Point(int X=0, int Y=0); Point(Point &p); int GetX() {return X;} int GetY() {return Y;} static int countP; static void GetC(Point A,Point B) { int z; z=sqrt((B.X-A.X)*(B.X-A.X)+(B.Y-A.Y)*(B.Y-A.Y)); cout<<z<<endl;} private: int X,Y; }; Point::Point(int X, int Y) { this->X=X; this->Y=Y; countP++; } Point::Point(Point &p) { X=p.X; Y=p.Y; countP++; } int Point::countP=0; int main() { Point D(3,4), *p; Point E(D); p = &E; void (*q)(Point,Point) = Point::GetC; (*q)(D, E); return 0; }