#include <iostream>
using namespace std;
class Obj {
public:
Obj(){cout <<"create obj" << endl;}
Obj(const Obj& other){cout<<"copy create obj"<<endl;}
~Obj(){cout<<"destructed obj"<<endl;}
};
int main() {
Obj(Obj((Obj())));
cout<<"---- exit main ----"<<endl;
}
我不知道为什么这个程序只打印出1个创建obj和1个被破坏的obj。帮助