Appendix A. C++ Reserved Keywords

Keywords are identifiers that are part of the basic syntax of the language. These names have fixed meanings and cannot be used in any way that attempts to change those meanings.

Here is a list of keywords in C++. Those that are shown in bold are also part of ANSI C89.

  • and

  • and_eq

  • asm

  • auto

  • bitand

  • bitor

  • bool

  • break

  • case

  • catch

  • char

  • class

  • compl

  • const

  • const_cast

  • continue

  • default

  • delete

  • do

  • double

  • dynamic_cast

  • else

  • enum

  • explicit

  • export

  • extern

  • false

  • float

  • for

  • friend

  • goto

  • if

  • inline

  • int

  • long

  • mutable

  • namespace

  • new

  • not

  • not_eq

  • operator

  • or

  • or_eq

  • private

  • protected

  • public

  • register

  • reinterpret_cast

  • return

  • short

  • signed

  • sizeof

  • static

  • static_cast

  • struct

  • switch

  • template

  • this

  • throw

  • true

  • try

  • typedef

  • typeid

  • typename

  • union

  • unsigned

  • using

  • virtual

  • void

  • volatile

  • wchar_t

  • while

  • xor

  • xor_eq

Get An Introduction to Design Patterns in C++ with Qt 4 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.