确实哦,看了看,很好,原来并不是书上翻译错误,楼上给的那个论坛这个问题的答案还有个外链,讲的超级好,确实是需要在类的外部定义,在类的内部const static 类型即使赋字面值常量也只能算是声明,定义必须在外部进行。
http://publib.boulder.
If a static data member is of const integral or const enumeration type, you may specify a constant initializer in the static data member's declaration. This constant initializer must be an integral constant expression.
Note that the constant initializer is not a definition. You still need to define the static member in an enclosing namespace.
非常感谢楼上各位回答。
[
本帖最后由 baobaoisme 于 2011-8-13 17:17 编辑 ]