extra tokens at end of #ifndef directive
时间: 2024-06-01 08:07:38 浏览: 10
The #ifndef directive is used in C and C++ to prevent multiple definitions of the same code. It checks whether a specific macro has been defined, and if it hasn't, it includes the code within the #ifndef and #endif directives.
If you are seeing an "extra tokens at end of #ifndef directive" error message, it means that there are additional tokens (such as characters or symbols) after the macro name in the #ifndef directive, which is not allowed. The #ifndef directive only accepts a single macro name as its argument.
To fix this error, make sure that there are no extra tokens after the macro name in the #ifndef directive. Check for any typos or missing characters in the macro name, and remove any extra symbols or characters that may be causing the error.