Lecture overview -- Keyboard shortcut: 'u'  Previous page: The C preprocessor -- Keyboard shortcut: 'p'  Next page: Arrays and Pointers -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Lecture 1 - Page 13 : 29
Notes about C++
From C to C++
Fundamental types

The most fundamental types are numeric types

  • void

    • The no value type

    • Also used for no parameters, void f(void), and for generic pointer, void*

  • Integer types

    • int, long and short, signed and unsigned

    • The ranges depends on the implementation

  • Floating point types

    • float and double, long double

    • The ranges depends on the implementation

  • No boolean type in C89

    • Relies on certain conventions for use of numeric types as integer types

  • Character types

    • A char is a byte

    • Denoted with single quotes: 'A', 'a', '\n', '\141', '\x61'

    • In reality small integers - signed or unsigned

    • Wide characters are also supported

Other fundamental types will be discussed on the following slides