Skip to main content
GameDev.net gamedev.net
🔒 Locked

Circular Dependency

Started by LifeOfTamir May 16, 2004 at 1:39 PM 3 replies 300+ views
Original Post
LifeOfTamir
LifeOfTamir
Hey guys, I have two classes Node and NodeList. Node needs NodeList and NodeList needs Node. Now i *did* have #included "NodeList.h" in Node and #include "Node.h" in NodeList. As most of you can guess this gave me a #include nesting problem. I guessed that this could be solved by using #ifndef. So i tried this: put this in the Node Class #ifndef __NODELIST_H_16_05_2004__ #define __NODELIST_H_16_05_2004__ and put this in the NodeList class #ifndef __NODE_H_16_05_2004__ #define __NODE_H_16_05_2004__ However, that didn't seem to work. I don't know if i used the correct syntax, or if i'm just completely wrong altogether. Could someone help me out? Thanks [edited by - LifeOfTamir on May 16, 2004 2:41:00 PM]
"Without the 0, alot of big numbers would just sit around looking rather stupid"
LifeOfTamir
LifeOfTamir
Thanks for the link SiCrane, very helpful
"Without the 0, alot of big numbers would just sit around looking rather stupid"
C-Junkie
C-Junkie
that should be added to the FAQ here, which doesn''t seem all that useful at the moment.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.