Multiple File Inclusion

I have an issue where I have files including other files, and these other files included include the original file, as well. If that was at all confusing, the files look something like this:

//File A
#include "B.h"
#include "C.h"


//File B
#include "A.h"
#include "C.h"


//File C
#include "A.h"
#include "B.h"


The files are all protected with #ifndef correctly, but I'm still getting errors relating to the files not being able to see objects declared in other files. If it's entirely necessary to include more code snippets, please tell me, and thanks in advance for any help.
If you've got circular dependencies like that, something is wrong with your design.

Remember, if A.h is only using pointers or references to class B, it doesn't need to include B.h - it can simply use a forward declaration.

Topic archived. No new replies allowed.