问题
填空题
#include<iostream.h>
class f
private:
float x,y;
public:
void f1(float a,float b)x=a;y=b;
f()x=0;y=0;
void move(float a,float b)x=x+a;y=y-b;
void get()cout<<x<<’ ’<<y<<endl;
;
void main()
f *p,a;
a.f1(1.6,3.8);
p=&a;
p.get();
答案
参考答案:p.get();
解析:p作为指针引用时使用“->”