class CStu
{
public:
int a;
CStu()
{
a = 12;
}
int operator+(int b) //向比如类外定义,在类内中不需要在定义类的对象,因为类内中,直接可以理
解为,已经存在了
{
return a + b;
}
};
int main()
{
CStu stu1;
int a = 15;
cout<<stu1 + a<<endl;
system("pause");
return 0;
}