会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
博客园
::
首页
::
博问
::
闪存
::
新随笔
::
联系
::
订阅
::
管理
::
公告
2008年1月13日
今天复习C++的const,又学到了很多内容,总结一下[原创]
摘要: 关于const的用法限制,可以用下面的一张表来表示 const int *p int cont *p int *const p ...
阅读全文
posted @ 2008-01-13 23:19 黑米
阅读(221)
评论(0)
推荐(0)
我倒,写了个小小的C++测试程序,竟然被瑞星当病毒给杀了!
摘要: 这是代码: #include #include using namespace std; typedef struct MyStruct{ int a; }; void TestConstCase() { const MyStruct st = {100}; (const_cast(&st))->a--; cout<<st.a<<endl; } int ma...
阅读全文
posted @ 2008-01-13 16:25 黑米
阅读(356)
评论(0)
推荐(0)