The Pre-Processor's main use, you'll find, is in including headers.
What are they? Headers are like units in Turbo Pascal for MSDOS. The
idea is that whenever you want to call functions that are built into the
language (like printing out to the screen), you Header Name Use iostream.h Printing out to the screen and reading the keyboard math.h Math functions, like square roots and logarithms
These files are called system headers, because they are not just files
you created, they are part of the compiler. To So let's try including both of them in a file: #include <iostream.h> #include <math.h> Pretty easy, eh? Notice that each one is on it's own line. This is a must, because it's very important that the # be at the very beginning of each line you want to use it in. |