Jump to content

[Share]Keywords and reserved names in C++


Recommended Posts

Posted

++'s keywords are a superset of C's keywords. Here is a list of all keywords of the language:

alignof compl        explicit  new              short       typename

and     concept      extern    not              signed      union

and_eq  const        false     not_eq           sizeof      unsigned

asm     const_cast   float     nullptr          static      using

auto    constexpr    for       operator         static_cast virtual

axiom   continue     friend    or               struct      void

bitand  decltype     goto      or_eq            switch      volatile

bitor   default      if        private          template    wchar_t

bool    delete       import    protected        this        while

break   do           inline    public           throw       xor

case    double       int       register         true        xor_eq

catch   dynamic_cast long      reinterpret_cast try

char    else         mutable   requires         typedef

class   enum         namespace return           typeid

 

Keywords can only be used for their intended purpose and cannot be used as names for other entities (e.g., variables, functions, class-names, etc.). In addition to keywords identifiers starting with an underscore are reserved identifiers in the sense that their use is a prerogative of the implementor

Credits to C++ site.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...