Compiler Error C2724

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:

// C2724.cpp
class C {
   static void func();
};

static void C::func(){};   // C2724
// try the following line instead
// void C::func(){};
实现的时候也不需要static的修饰,因为static是声明性关键字; ()
posted @ 2009-07-14 11:28  dzqabc  阅读(392)  评论(0编辑  收藏  举报