码迷,mamicode.com
首页 > 编程语言 > 详细

[C++] static member variable and static const member variable

时间:2015-11-07 14:40:24      阅读:357      评论:0      收藏:0      [点我收藏+]

标签:

  • static member variable[可读可写]

    可以通过指针间接修改变量的值

  • static const member variable[只读]

    压根就不可以修改变量的值,会报错

 

技术分享

[C++] static member variable and static const member variable

标签:

原文地址:http://www.cnblogs.com/tianhangzhang/p/4944914.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!