#include<bits/stdc++.h> usingnamespace std; #define M 100007 #define N 1007 #define INF 0x3f3f3f3f #define ll long long #define db double intmain(int argc, char* argv[]){ // malloc free // new delete staticint a; Test t(1); //栈区 // t.clean(); // stack vs. heap /* int* i = new int; int* j = new int; cout << i << endl; cout << j << endl; if (1) { int m; //结束自动析构 } */ Test* t2 = newTest(3); //堆区