会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
瓜蛋的博客
专一、持久!立足长远,循序渐近,计划行事,勿在浮沙筑高墙!
博客园
首页
新随笔
联系
管理
2011年4月3日
关于静态对象构造
摘要: //分析以下程序的执行结果#include<iostream.h>#include<conio.h>class Sample{ int x; public: Sample(int a) { x=a; cout<<"constructing object:x="<<x<<endl; }}; void func(int n) { static Sample obj(n);}int main(){ func(1); func(10...
阅读全文
posted @ 2011-04-03 22:26 瓜蛋
阅读(528)
评论(1)
推荐(0)
编辑
公告