C++ Reserved Words

The following are reserved keywords words in C++ and may not be otherwise used.

  • asm
  • auto
  • break
  • case
  • catch
  • char
  • class
  • const
  • continue
  • default
  • delete
  • do
  • double
  • else
  • enum
  • extern
  • float
  • for
  • friend
  • goto
  • if
  • inline
  • int
  • long
  • new
  • operator
  • private
  • protected
  • public
  • register
  • return
  • short
  • signed
  • sizeof
  • static
  • struct
  • switch
  • template
  • this
  • throw
  • try
  • typedef
  • union
  • unsigned
  • virtual
  • void
  • volatile
  • while

Also identifiers containing double underscores ( __ ) are reserved for use by standard libraries and C++ implementations.

 

This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow
Donate