C++ keywords are reserved words that have special meaning in the language and cannot be used as variable names, class names, or identifiers. These keywords define the structure of a C++ program, control execution flow, handle data types, support object-oriented programming, and interact directly with the compiler.
Understanding C++ keywords is essential for writing error-free code and mastering the fundamentals of the language. Below is the complete, updated list of all C++ keywords, including core, C++11, C++14, C++17, and C++20 additions.
Complete C++ Keywords List (All 95 Keywords)
1. Core C++ Keywords
asm
auto
bool
break
case
catch
char
class
const
const_cast
continue
default
delete
do
double
dynamic_cast
else
enum
explicit
export
extern
false
float
for
friend
goto
if
inline
int
long
mutable
namespace
new
operator
private
protected
public
register
reinterpret_cast
return
short
signed
sizeof
static
static_cast
struct
switch
template
this
throw
true
try
typedef
typeid
typename
union
unsigned
using
virtual
void
volatile
wchar_t
while
2. C++11 Keywords
alignas
alignof
char16_t
char32_t
constexpr
decltype
noexcept
nullptr
static_assert
thread_local
3. C++14 Keywords
( No new keywords introduced)
4. C++17 Keywords
( No new reserved keywords added, but some expansions like if constexpr)
5. C++20 Keywords
concept
consteval
constinit
co_await
co_return
co_yield
requires
6. Alternative Tokens (Also Reserved in C++)
and
and_eq
bitand
bitor
compl
not
not_eq
or
or_eq
xor
xor_eq
7. Contextual Keywords (Used in specific contexts, not fully reserved)
final
override
Why This List Matters
Knowing these keywords helps new programmers avoid naming conflicts, understand compiler rules, and write clearer, structured, and efficient C++ programs. These keywords form the backbone of data types, control statements, loops, classes, memory management, and modern C++ features.
Conclusion
C++ keywords are the foundation of the language, shaping everything from simple programs to advanced OOP systems. Memorizing and understanding how each keyword works will help you write more reliable code and build a strong foundation for learning advanced C++ concepts.
💬 Comments (0)
No comments yet. Be the first to share your thoughts!
📝 Leave a Comment