The C++ preprocessor has 4 major func-
tions:
1----File Inclusion:
#include <stream.h>
#include "foo.h"
2---- Symbolic Constants:
#define SCREEN SIZE 8O
#define FALSE O
3--- Parameterized Macros:
#de.ne SQUARE(A) ((A) * (A))
#define NIL(TYPE) ((TYPE *)0)
#define IS UPPER(C) ((C) >= 'A' && (C) <= 'Z')
4-- Conditional Compilation:
#ifdef "cplusplus"
#include "c++-prototypes.h"
#elif STDC
#include "c-prototypes.h"
#else
#include "nonprototypes.h"
#endif
-------------------------------------------------------------
Loop
C++ has 5 methods for repeating an ac-
tion in a program:
1. for: test at loop top
2. while: test at loop top
3. do/while: test at loop bottom
4. Recursion
5. Unconditional Branch: local (goto) and non-
local (setjmp and longjmp)