How do I make a class item global? This is what i'm doing now....(i'm using borland c++ builder 6.0)
extern int x;
extern int y ;
extern Tank1 *Tank = new Tank1;
extern TImage *Sprite_Tank1 = new TImage(Owner);
in a .h file
Tank1 *Tank = new Tank1;
TImage *Sprite_Tank1 = new TImage(Owner);
int x;
int y ;
int i;
y=200;
x=100 ;
in the main .cpp file under a button click
yes i've included the .h file in the main .cpp file!
As long as I don't do the extern thingy for {TImage *Sprite_Tank1 = new TImage(Owner);} , it compiles, but isnt global, but when I do the extern thingy, it says "[C++ Error] Whack.h(15): E2451 Undefined symbol 'Owner'"
Any suggestions?
Thanks
DWCode:extern int x;