Quote Originally Posted by vexon
Nevermind i solved it all now i did use an extern because I believe that's the only way of sharing the same values in multiple cpp's.
So here's what I did:

//AF Editor.h

struct AFHEADER {
    short m_fighternumber;

extern AFHEADER afheader;

//AF Editor.cpp

AFHEADER afheader;
And it just works
Had the same problem and the above code also works for me. Using
g++ (GCC) 3.4.4 20050721 (Red Hat 3.4.4-2)

extern StructureName variableName may declare that there is a variable of StructureName however I am not sure how the declaration is done but to bring more light if you do not declare the varialble in your .cc file then the linker complains that the variable is undeclared. So my thought would be that if in your program you try to do (without declaring the structure variable in the source file):
afheader.m_figthernumber = 3;
then reservation of memory should be wrong.
Imagine you also had the following members to your structure definition:
short friendlyFighters;
short enemyFighters;
then would the above statement reserve memory for these fields??? In other words will the above statement declare (ie reserve memory) for a structure variable or just for an integer variable????

Just a thought, the C gurus could give more light.