#include<iostream>
using namespace std;
class Point {
public:
Point(int a=3,int b=5){ X=a;Y=b;}
int GetX(){return X;}
int GetY(){return Y;}
private:
int X,Y;
}; 现有语句Point *p=new Point[2];则与(*p).GetX()等效的表达式是( )?
#include<iostream>
using namespace std;
class Point {
public:
Point(int a=3,int b=5){ X=a;Y=b;}
int GetX(){return X;}
int GetY(){return Y;}
private:
int X,Y;
}; 现有语句Point *p=new Point[2];则与(*p).GetX()等效的表达式是( )?
Point[0]. GetX()
p[0].GetX()
p->GetX()
GetX()