Original Post
I'm writing a rather large project in C++. I have many classes (lets say 20) and they all have corresponding header files. I have one header file called main.h which declares global classes. I have a class called 'creatures' which contains 4 limb subclasses. Now what I want to do is declare my creatures globally (so that they can transfer data to eachother). But when I add creatures.h to the main.h file (so I can declare them as global variables), the compiler spits out this error :
Quote:If I remove #include Creatures.h from main.h, it compiles perfectly. So my question is why does adding this header file cause the compiler to not know what a 'limb' is? Especially when you consider that limb.h is actually included in main.h itself, and creature.h. Any help would be great. I've tried everything I can think of all day, but to no avail.
Creature.h(17) : error C2143: syntax error : missing ';' before '*' Creature.h(17) : error C2501: 'Limb' : missing storage-class or type specifiers Creature.h(17) : error C2501: 'leg' : missing storage-class or type specifiers