main 主函数执行完毕后,是否可能会再执行一段代码?(转载)

main 主函数执行完毕后,是否可能会再执行一段代码?(转载)


#include<cstdlib>
#include<iostream>
using namespace std;

int f1(){
        cout << "f1" << endl;
        return 0;
}

int f2(){
       cout << "f2" << endl;
        return 0;
}

int f3(){
       cout << "f3" << endl;
        return 0;
}

int main(){
       _onexit(f1);
       _onexit(f2);
       _onexit(f3);
       cout << "main" << endl;
       cin.get();
       return 0;
}


  




posted @ 2015-05-26 19:00  外禅内定,程序人生  阅读(306)  评论(0编辑  收藏  举报