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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock