C++中怎么样可以做到让一个函数最后执行

下面代码中,怎么才能保证让lastExecute最后执行(在所有析构函数执行完后再执行lastExecute)。非常感谢。
C/C++ code
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class  CApp
{
public :
     ~CApp()
     {
         printf ( "Deconstruct CApp..\n" );
     }
};
 
CApp app1, app2;
 
void  lastExecute()
{
     printf ( "Last execute..\n" );
}
 
int  main()
{
     return  0;
}
xyzc.cn/health/jsmr/20130912/592033.html
jzptt.ln.cn/jzptthtm/newspagesh.php?Newsid=170086
shaoxing.com.cn/news/content/2013-09/12/content_1960495.htm
xgrb.cn/jkzj/zixunsudi/20130911/15793.html
xyzc.cn/health/jsmr/20130912/592065.html
xyzc.cn/health/jsmr/20130912/592061.html
xyzc.cn/health/jsmr/20130912/592056.html
jzptt.ln.cn/jzptthtm/newspagesh.php?Newsid=170088
shaoxing.com.cn/news/content/2013-09/12/content_1960466.htm
xyzc.cn/health/jsmr/20130912/592046.html
shaoxing.com.cn/news/content/2013-09/11/content_1954437.htm
jzptt.ln.cn/jzptthtm/newspagesh.php?Newsid=168782
xyzc.cn/health/jsmr/20130910/574023.html
xgrb.cn/jkzj/zixunsudi/20130909/14406.html
xyzc.cn/health/jsmr/20130910/574012.html
jzptt.ln.cn/jzptthtm/newspagesh.php?Newsid=168783
xyzc.cn/health/jsmr/20130910/574060.html
jzptt.ln.cn/jzptthtm/newspagesh.php?Newsid=168784
xyzc.cn/health/jsmr/20130910/574050.html
shaoxing.com.cn/news/content/2013-09/10/content_1922233.htm
shaoxing.com.cn/news/content/2013-09/10/content_1922299.htm

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值