I'm paying 100 fg to help me figure this problem out.Is there a way I can use a header file in my main program AND in a header file used by my main program? For example:
Code
Inside Class 3.h:
#include Class1.h
#include Class2.h
Code
Inside Main Program:
#include Class1.h
#include Class2.h
#include Class3.h
However I'm getting a "Redefinition" error, I've read about forward declaration but I'm not sure how to apply it here.
Edit:
I did
Code
Inside Class 3.h:
class Class1.h;
class Class2.h;
But it's saying expected unqualified-id before '.' token. So I think I'm supposed to use :: somewhere, but I'm not sure where/how.
It's also saying the member variables (objects of the Class 1 and 2) inside this Class 3.h have incomplete types
This post was edited by Foxic on May 14 2013 12:09am