All C++ Keywords
All C++ Keywords
A compact scan page listing C++ keywords and keyword-like alternative tokens in grouped form.
All C++ Keywords
A compact scan page listing C++ keywords and keyword-like alternative tokens in grouped form.
Use reference pages to confirm names, categories, nearby facilities, and the constraints that matter before writing or reviewing code.
This page is optimized for scanning. Use C++ language reference when you want more explanation.
if, else, switch, case, defaultfor, while, do, break, continue, goto, returntry, catch, throwclass, struct, union, enumtypename, typedef, usingnamespace, template, concept, requirespublic, protected, privatefriend, virtual, override, final, explicit, inlinebool, char, char8_t, char16_t, char32_t, wchar_tshort, int, long, signed, unsignedfloat, double, voidconst, volatile, mutablestatic, extern, thread_local, registernew, deletetypeid, decltypesizeof, alignof, noexceptstatic_cast, dynamic_cast, const_cast, reinterpret_castauto, operator, this, nullptrtrue, falseconstexpr, consteval, constinitco_await, co_yield, co_returnmodule, import, exportand, and_eqbitand, bitorcomplnot, not_eqor, or_eqxor, xor_eqasm and some compiler-specific extensions may appear in toolchains, but they are not what you should reach for first in portable modern code.int main() {
int total = 0;
for (int i = 0; i < 4; ++i) {
total += i;
}
return total == 6 ? 0 : 1;
}