类的static函数成员在定义时不用要static

来源:互联网 发布:mac框架 编辑:程序博客网 时间:2024/05/01 14:57

否则出错:

 cannot declare member function ‘static int Foo::bar()’ to have static linkage

参考:http://cplusplus
WRONG



WORKS


ALSO WORKS