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

时间:2015-05-26 21:13:09   收藏:0   阅读:179
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;
}


  


来自为知笔记(Wiz)


原文:http://www.cnblogs.com/ZhangJinkun/p/4531435.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!