|
-
Nov 23rd, 2002, 03:41 PM
#1
Thread Starter
Addicted Member
#include
I have a header file, Classes.h, and another header file, Functions.h.
Theres two classes in Classes.h, and one function in Functions.h. Class A needs to pass a reference to class B to the function in Functions.h. Now classes.h needs to include functions.h so it knows recognizes the function name, but functions.h needs to include classes.h because it needs to recognize the class that is being passed to it. But if you include functions.h in classes.h and classes.h in functions.h, you get an infinite recursion error. I have tried including classes.h and function.h in the main cpp file, but that doesn't work. how can i solve this?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|