相当于构造函数的另一种方便的写法
#include<iostream>
#include<cstdio>
using namespace std;
class T{
public:
int s_a;
int s_b;
int s_c;
public:
T(int a, int b, int c): s_a(a), s_b(b), s_c(c){
}
};
void f()
{
T t1 = T(10,20,30);
cout<<t1.s_a<<" "<<t1.s_b<<" "<<t1.s_c<<endl;
}
int main()
{
f();
return 0;
}