In this lesson we are going to take a look at 
multiple files. Up to this point, you have been 
doing your entire program in one file.
You have had: 
-Main function
-Preprocessor directives
-Prototypes 
-Constants 
and below main,
-Function definitions
Well, now we're going to split everything off into 
separate files you going to have:
-A Header file,
with prototype information (declarations of 
functions),
-Constants (global constants)
-Struct and class definitions
(which we haven't yet gotten to) and,
-Templated code
In the main file you have:
-The driver function (main function)
Third file the accompanying function 
implementation file. The definitions of functions 
that you have prototyped in the header.
We have the one file model, where you have 
everything:
-The system includes
-The main driver function
-Prototypes 
and 
-Function definitions
That’s what you have seen so far. Then there is 
the modular model,
were you have multiple files:
-A main driver file 
-Header files
-A function definition or implementation source 
files
Those contain the definitions of your auxiliary 
functions.
Here we start with "main.CPP". You got:
-Preprocessor commands
-Using namespace standard,
-The prototype,
-"main ()"
-The definition of the function "greeting"
Now this is a ridiculous program, of course, it as 
one function,
and all it does is output a message to the user 
and that's it. But it demonstrates what we're 
talking about. We are going to create "greet.H"
You'll notice that there are special lines of code if 
they are:
#ifndef GREET_H 
#define GREET_H   
#endif
These are preprocessor commands. What they 
do is tell the preprocessor "do not define the 
material in this header file more than once."
The way it reads is: if not defined,
Then define and the "#endif" will delimit what it is 
that you're talking about.
This prevents multiple definitions of "whatever it 
is" contained in this file. This is only done with the 
header file.
The convention of the identifier used is the name 
of the file in upper case,
You can actually put anything there you wanted 
but the convention is: all upper case, the named 
file. OK, we move over there to,
the prototype for the program. Then, we got a 
separate file called "GREET.H"
Secondly we are going to create GREET.CPP 
this is called the implementation file.
and this is where we're going to put the definition 
of the function greetings that's been prototyped in 
the header
Now you will notice new includes, we see it here 
and here. If you have three separate files,
When they get compiled, the compiler needs to 
know where this information is. When this goes 
to the compiler, as I stated before the compiler,
actually, the preprocessor will remove that line. It 
takes #include  and throws it out,
Puts in its place the code that's in the IO stream 
library. The same thing is true for a user include.
Notice that the difference is the double quotes not 
angle brackets.
This is for a file that exists in the current directory
GREET.H has to be in the same directory.
The preprocessor will strip out that line of code,
and take the code from GEET.H and insert it into 
the program there. This way the compiler knows,
of the declarations of that function that using.
Why do you #include "GREET.H" here in the 
implementation file?
Well again, when the compiler gets to that file. It 
sees the definition of a function and doesn't know 
that it's actually been declared.
