#include <iostream>
using namespace std;
class A
{
static int count;
int indent;
public:
A () : indent (count++)
{
cout << "[" << this << "] ";
cout << "A () called ";
cout << "count : "<< count << endl;
}
~A ()
{
--count;
cout << "[" << this << "] ";
cout << "~A () called ";
cout << "count : "<< count << endl;
}
A (const A &a) :indent (count++)
{
cout << "[" << this << "] ";
cout << "A (const A &) called ";
cout <<</
返回类类型的函数
于 2022-05-12 14:37:51 首次发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)