还请各位前辈能够指点一下我,谢谢!!
#include<iostream>
using namespace std;
class person
{
public:
person();
~person();
private:
int A;
int B;
int C;
};
person::person()
{
A = 10;
B = 20;
C = 30;
cout << "调用了构造函数!!" << endl;
}
person::~person()
{
cout << "调用了析构函数!!" << endl;
}
void test01()
{
person p;
}
int main()
{
test01();
system("pause");
return 0;
}