Keywords in c++


  • C++ reserves a number of words for special use that could otherwise be used as identifiers. Called reserved words or keywords, these words are special and are used to define the structure of C++ programs and statements.
  • Fortunately, if you accidentally attempt to use one of the reserved words in a program as a variable name, the compiler will issue an error.
  • C++ reserves these words for specific purposes in program construction. None of the words in this list may be used as an identifier; thus, you may not use any of these words to name a variable.
  •  

    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