Compiler Error C2575
'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(){}
};
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for