Sign in to follow this  
Reegan

..multiple headers and source files (SOLVED)

Recommended Posts

Reegan    100
As the title explains, im having trouble with getting used to multiple headers and source files and have run into a problem.. heres a diagram of how i have structured my program: http://img404.imageshack.us/my.php?image=filestructureau9.png cDirect3D.h and cWindow.h need to be able to communicate with eachother but when i include each header into the 2 different source files i get an error saying something like: error C2061: syntax error : identifier 'cWindow' and some more errors relating to it. So i took out '#include "cDirect3D.h" from the cWindow header file and the program worked =/ however i need to include the cDirect3D.h in order to progress in the direction i was heading... So yeah, do i have bad program structure meaning the way im programming my game (its just a retro pong game nothing special), Or is there some advice anyone can give me to get the results im looking for? Thanks in adv ~Reegan [Edited by - Reegan on October 22, 2008 7:07:48 PM]

Share this post


Link to post
Share on other sites
Reegan    100
Thanks! that solved it :D
Apparently i had something called a Cyclic dependency and the forward declarations fixed it :)

If i ever hav any more problems with my source/header files ill look back onto that article!

Thanks again :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this