| Message |
Sure. When you compile code, every type you use (well, really, pretty much everything you use) has to be something the compiler has seen before. If I tell you: here is an object of type "foobar", you will look at me and go "huh? what's a foobar?" The compiler works just the same way.
So, when you define a structure of type "jope_type", that definition has to come before any case where you use that structure. So, the following code is not going to work:
jope_type theStructure;
struct jope_type {
int member1;
int member2;
/* ... */
};
But if you reverse the order, it will work, since the compiler knows what a "jope_type" is when you try to create the object of that type.
Let me know if this clears things up. I suspect you are using a code snippet (given the "Jobo Online Playerfile Editor" name), so one recommendation is to make sure you followed it exactly -- these things tend to be extremely finnicky and even a slight variation (that seems trivial to you) can be enough to break the code. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | top |
|