class Test{int a,b;public:Test ( int m, int n ) { a=m; b=n; }void Set( int m, int n ) { a=m; b=n; }//......};
只要有定义就可以了,在调用的时候注意要传参个数和类型要一致