Compiler Error C2518
keyword 'keyword' illegal in base class list; ignored
The keywords class
and struct
should not appear in a base class list.
The following sample generates C2518:
// C2518.cpp
// compile with: /c
class B {};
class C : public class B {}; // C2518
class D: public B {}; // OK
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