C++ Keywords

C++ Keywords must be in your knowledge because you can not use them as a variable name. This tutorial describes various Keywords available in C++.

You can't use a keyword as an identifier in your C++ programs; it's reserved words in the C++ library and used to perform an internal operation. The meaning and working of these keywords are already known to the C++ compiler.

C++ Keywords List

asm else new this
auto enum operator throw
bool explicit private true
break export protected try
case extern public typedef
catch false register typeid
char float reinterpret_cast typename
class for return union
const friend short unsigned
const_cast goto signed using
continue if sizeof virtual
default inline static void
delete int static_cast volatile
do long struct wchar_t
double mutable switch while
dynamic_cast namespace template

In addition, the following words are also reserved:

And bitor not_eq xor
and_eq compl or xor_eq
bitand not or_eq

You should also try to avoid using names from the C++ library, e.g. swap, max.



Found This Page Useful? Share It!
Get the Latest Tutorials and Updates
Join us on Telegram

Notifications

Updates are enabled for this browser.

Receive new tutorials, articles and learning resources. You can turn updates off anytime.

Test browser code

Use this code in admin to send a test notification to this browser.