Compiler Error C2724

来源:互联网 发布:淘宝男装网红店 编辑:程序博客网 时间:2024/06/05 05:02
Compiler Error C2724

 

Error Message

'identifier' : 'static' should not be used on member functions defined at file scope

 

Static member functions should be declared with external linkage.

The following sample generates C2724:

Copy Code
// C2724.cppclass C {   static void func();};static void C::func(){};   // C2724// try the following line instead// void C::func(){};
实现的时候也不需要static的修饰,因为static是声明性关键字; ()
原创粉丝点击