This blog post will teach you about C++ keywords (reserved words in C++ programming). We will list out almost famous C++ keywords and their examples. Let’s first understand what C++ keyword is.
Keywords are predefined reserved identifiers that have special meanings. And because they are reserved by the language, these keywords are not available for re-definition or overloading. In simple words, you can not use keywords as identifiers in your program.
For example,
int while;
Here, int and while both are keywords but in the above example, you are trying to use while as an identifier. You will get the compiler error.

Standard C++ keywords:
The following is the list of keywords used in C++ programming. The meaning of the few keywords is updated in different versions of C++.
| A – C | D – P | R – Z |
|---|---|---|
alignas (since C++11)alignof (since C++11)andand_eqasmatomic_cancel (TM TS) atomic_commit (TM TS) atomic_noexcept (TM TS) autobitandbitorboolbreakcasecatchcharchar8_t (since C++20)char16_t (since C++11)char32_t (since C++11)class (1)complconcept (since C++20)constconsteval (since C++20)constexpr (since C++11)constinit (since C++20)const_castcontinueco_await (since C++20)co_return (since C++20)co_yield (since C++20) |
decltype (since C++11)defaultdeletedodoubledynamic_castelseenumexplicitexportexternfalsefloatforfriendgotoifinlineintlongmutable (1)namespacenewnoexcept (since C++11)notnot_eqnullptr (since C++11)operatororor_eqprivateprotectedpublic |
reflexpr (reflection TS)registerreinterpret_castrequires (since C++20)returnshortsignedsizeofstaticstatic_assert (since C++11)static_caststructswitchsynchronized (TM TS) templatethisthread_local (since C++11)throwtruetrytypedeftypeidtypenameunionunsignedusing (1)virtualvoidvolatilewchar_twhilexorxor_eq |
Note: The register keyword is unused but is reserved for future use.
C++ also has some identifiers with special meanings, which may be used as names of objects or functions, but have special meanings in certain contexts. These are the following.
| final (C++11) override (C++11) transaction_safe (TM TS) transaction_safe_dynamic (TM TS) import (C++20)module (C++20) |
Recommended Articles for you:
- C Programming Courses And Tutorials.
- CPP Programming Courses And Tutorials.
- Python Courses and Tutorials.
- An Amazing list of Gifts for Programmers, You must.
- Introduction of reference in C++.
- Pointer Vs Reference in C++.
- Use of explicit keywords in C++.
- Best electronic kits for programmers.
- References and const in C++ with example programs.
- C++ Variables, Constants, and literals.
- C++ Constructors, you should know.