文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>C++中static const的初始化

C++中static const的初始化

时间:2010-08-08  来源:haox2653

今天发现了一个GCC与VC之间区别,关于类的static const成员能否在类声明时初始化。

class A
{
      static const int a = 10;
public:
      static bool _stdcall fun();
      bool myfun(void);
};

static const int a = 10;在DEV C++中编译通过,但VC中报错误:pure specifier can only be specified fo functions

相关阅读 更多 +
排行榜 更多 +
PRO足球挑战

PRO足球挑战

体育竞技 下载
初级护师牛题库

初级护师牛题库

学习教育 下载
最实惠

最实惠

购物比价 下载