C++规定,全局对象的构建比程序的进入点(main/winmain)更早。 class A{public: A() { cout<<"A"<<endl; }};A a;int main(array<System::String ^> ^args){ cout<<"main"<<endl; getchar(); return 0;} 结果为: A main