This documentation is archived and is not being maintained.

Compiler Error C2724

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

Static member functions should be declared with external linkage. Static member functions at file scope cause an error under ANSI compatibility (/Za) and a warning under Microsoft extensions (/Ze).


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

static void C::func(){};    // C2724