Export (0) Print
Expand All
Expand Minimize

Compiler Error C2575

Error Message

'identifier' : only member functions and bases can be virtual

A global function or class is declared virtual. This is not allowed.

The following sample generates C2575:

// C2575.cpp
// compile with: /c
virtual void func() {}   // C2575

void func2() {}
struct A {
   virtual void func2(){}

Community Additions

© 2014 Microsoft