下列程序的运行结果为( )。 #include<iostream.h> class Location { protected: int X,Y; publiC: void SeX(int myx){X=myx;} void SetY(int myy){Y=myy;} void showxy( ) {cout<<"X=" <<X<<" " <<"Y"=<< Y<< endl;} }; Class Rectangle :public Location{ private: int H,W; public: void SetH(int myh){H=myh;} void SetW(int myw) {W=myw;} void show( ) {cout <<"X="<<X<<" "<<"Y="<<"<< Y<<" "<<"H="<< H<<" " <<"W=" <<W <<endl;} }; void main( ) { Rectangle r1; r1.SetX(3); r1.SetY(5); r1.SetH(4); r1.SetW(6); r1.showxy( ); r1. show( );}
A. ThisForm.Text1.Value
B. ThisForm.Parent.Value
C. Parent.Text1.Value
D. This.Parent.Text1.Value
参考答案:A
解析:SEEK、FIND和LOCATE命令都可用来查询记录,选项B)属于语法错误。