#include <iostream>using namespace std;class Test{Public:Test(int aa){______________}int Getx(){_______________}private:int x;};int main(){int m;while(cin>>m){Test t(m);cout<<t.Getx()<<endl;}return 0;}
1 回答

蕭歡打靶把營歸
TA貢獻(xiàn)63條經(jīng)驗(yàn) 獲得超16個(gè)贊
Test()為構(gòu)造方法,結(jié)合參數(shù)應(yīng)該填this.x=aa;
Getx()填return this.x;
- 1 回答
- 0 關(guān)注
- 1295 瀏覽
添加回答
舉報(bào)
0/150
提交
取消