The incomplete class declarations in the header usually declare the functions, but have no actual code in them. that way, the amount of code you can
include less code when you need to reference the class. The compiler will link it for you later.
eg. Queue.h
Code:
class Queue{
public Queue();
public void Enqueue(Object obj);
public Object Dequeue();
public Object Peek();
private Vector myVector;
}
and then in Queue.cpp you'd have the actual code for the functions:
Code:
#include "Queue.h"
public void Queue::Enqueue(Object obj){
myVector.Add(obj);
}
... other functions
I think generally you include files in the header only if you reference them in the header, eg. in this example you'd have to include Vector.h in the header
In the .cpp file, include the header file of the class, as well as the header of any other classes you used that your header doesn't know about.
I hope this makes sense.