填空题

完成下列类的构造函数,初始化语句为______。 #include<iostream.h> class Test { private: int x,y; public: void Test(int initx,int inity){ ______ } void printx( ){cout<<x<<"-"<<y<<"="<<x-y;} }; void main( ) { Test x(300,200); x.printx( ); }

【参考答案】

x=initx; y=inity;