C++ Reserved Words

The reserved words used by C++ can be grouped into several categories. By the time you finish this introductory course you should be familiar with all the words in bold. After the Objected-oriented programming and design course you should further be familiar with the underlined words.

  • Data Types (the various types of data the computer can store):
  •           char      short       int       long   (integer types)
              enum                                   (enumerated type)
              bool      true        false            (boolean type and values)
              double    float                        (real numbers)
              void                                   (for functions that don't return values)
              struct    union       typedef          (user defined types)
    
  • Type modifiers (which control aspects of how the computer stores data):
  •           signed    unsigned                     
              volatile  register                     
              const     static      extern     auto
    
  • Type casting:
  •           static_cast    dynamic_cast    const_cast
    
  • Flow of Control (which control the order of instruction execution):
  •           if        else                         (two-way branch)
              switch    case        default          (multi-way branch)
              for       while       do               (loops)
              break     continue                     (loop iteration control)
              return                                 (immediate return from function)
              goto                                   (direct jump)
    
  • Dynamic memory allocation:
  •           new        delete
    
  • Object-oriented keywords (used later in the Object-oriented programming and design course):
  •           class     
              private    protected  public
              virtual
              this     
              friend     
              template
              operator
    
  • Exception handling:
  •           try        throw      catch
    
  • Namespace control:
  •           using      namespace
    
  • Miscellaneous:
  •           sizeof     inline     asm
    
    Back to the course.