c++关于main的一些问题,敬请高手指教

来源:互联网 发布:proxifier linux 编辑:程序博客网 时间:2024/05/22 02:11

#include   <iostream>
#include   <stdlib.h>
using   namespace   std;

class   A   {
public:
        A()   {
        cout   < <   "I   come   here   before   main()! "   < <   endl;
        f();
        }
        static   void   f()   {
                cout   < <   "I   come   here   before   main()   too! "   < <   endl;
        }
};
static   A   a;
       
int   main(int   argc,   char   *argv[])
{
    cout   < <   "Entering   main()! "   < <   endl;
    cout   < <   "Leaving   main()! "   < <   endl;
    system( "PAUSE ");
    return   0;
}

 

http://topic.csdn.net/t/20030103/17/1324264.html这里面已经有各位高手讨论了