See http://www.csci.csusb.edu/dick/c++std/cd2/gram.html for an
ANSI C++ grammar.
- boolean value: bool (1 bit), true or false
- ASCII character: char (1 byte), integer between -128
and 127
- integer number:
- int (usually 4 bytes), between
and
- long (usually 8 bytes)
- can be prefixed by unsigned
- floating point: double (also float, rarely used)
- arrays:
typeName variableName[ constArraySize] ; char myString[15];
- pointers (a pointer contains a memory address):
typeName * pointerName ;
char* stringPtr;
Subsections
Leo Liberti
2008-01-12