• Advertisement
Sign in to follow this  

..multiple headers and source files (SOLVED)

This topic is 3413 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
Sign in to follow this  

  • Advertisement