Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
178 lines (145 sloc) 6.34 KB

 

 

 

 

 

(C++) Keyword

 

Keywords are the words that 'do' something. These words therefore cannot be used as variable names. In many C++ IDE's, these appear in bold.

 


int if = 3; //ERROR!

 

List of all keywords

 

Some keywords are only accepted by some standards:

 

  1.  C++11 alignas
  2.  C++11 alignof
  3. C++98C++11 asm
  4. C++98C++11 auto
  5. C++98C++11 bool
  6. C++98C++11 break
  7. C++98C++11 case
  8. C++98C++11 catch
  9. C++98C++11 char
  10.  C++11 char16_t
  11.  C++11 char32_t
  12. C++98C++11 class
  13. C++98C++11 const
  14.  C++11 constexpr
  15. C++98C++11 const_cast
  16. C++98C++11 continue
  17.  C++11 decltype
  18. C++98C++11 default
  19. C++98C++11 delete
  20. C++98C++11 do
  21. C++98C++11 double
  22. C++98C++11 dynamic_cast
  23. C++98C++11 else
  24. C++98C++11 enum
  25.  C++11 enum class
  26. C++98C++11 explicit
  27. C++98C++11 export
  28. C++98C++11 extern
  29.  C++11 extern template
  30. C++98C++11 false
  31.  C++11 final
  32. C++98C++11 float
  33. C++98C++11 for
  34. C++98C++11 friend
  35. C++98C++11 goto
  36. C++98C++11 if
  37. C++98C++11 inline
  38. C++98C++11 int
  39. C++98C++11 long
  40. C++98C++11 mutable
  41. C++98C++11 namespace
  42. C++98C++11 new
  43.  C++11 noexcept
  44.  C++11 nullptr
  45. C++98C++11 operator
  46. C++98C++11 private
  47. C++98C++11 protected
  48. C++98C++11 public
  49. C++98C++11 register
  50. C++98C++11 reinterpret_cast
  51. C++98C++11 return
  52. C++98C++11 short
  53. C++98C++11 signed
  54. C++98C++11 sizeof
  55. C++98C++11 static
  56.  C++11 static_assert
  57. C++98C++11 static_cast
  58. C++98C++11 struct
  59. C++98C++11 switch
  60. C++98C++11 template
  61. C++98C++11 this
  62.  C++11 thread_local
  63. C++98C++11 throw
  64. C++98C++11 true
  65. C++98C++11 try
  66. C++98C++11 typedef
  67. C++98C++11 typeid
  68. C++98C++11 typename
  69. C++98C++11 union
  70. C++98C++11 unsigned
  71. C++98C++11 using
  72. C++98C++11 virtual
  73. C++98C++11 void
  74. C++98C++11 volatile
  75. C++98C++11 wchar_t
  76. C++98C++11 while

 

 

 

 

 

References

 

  1. Bjarne Stroustrup. The C++ Programming Language (3rd edition). 1997. ISBN: 0-201-88954-4.

 

 

 

 

 

 

You can’t perform that action at this time.