编译器错误 C2724

“identifier”:“static”不应在文件范围内定义的成员函数上使用

静态成员函数应该用外部链接来声明。

以下示例生成 C2724:

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

static void C::func(){};   // C2724
// try the following line instead
// void C::func(){};