Advertisement

DX globals

Started by February 11, 2000 04:16 PM
0 comments, last by ECKILLER 25 years, 1 month ago
Where should i put my extern variables in DX if i have multiple files. I''m getting linker errors because there being doubly defined. I want them to be visible in more than one file. Thanks ECKILLER
ECKILLER
You put the global variable in _one_ cpp file

Then you use extern to access it from other file, preferably in a header file

extern long MyGlobalVariable;

This topic is closed to new replies.

Advertisement