009 哪来的输出

#include <iostream>
using namespace std;
class A {
	public:
		int i;
		A(int x) { i = x; }
~A() {
        cout << i << endl;
    }
};
int main()
{
	A a(1);
	A * pa = new A(2);
	delete pa;
	return 0;
}

posted @ 2022-02-19 22:43  icefield817  阅读(39)  评论(0编辑  收藏  举报