about compilation...

Hey,

Can someone please explain what the compiler does with the header and CPP file.

in cpp I see
 
#include "a.h" 
in the header file

1
2
3
4
5
6
7
8
//#ifndef A
//#define A
class A
{
//
};

//#endif // A 


now when I want to use this in the main program we say
1
2
#include "a.h"
//and not include "a.cpp" 

I Don't understand this. There 's no include in the header.
How is the .cpp linked to the header??
Topic archived. No new replies allowed.