I have a C++ project that will turn out to be fairly large.
I have a requirement to maintain and update several hundred variables.
These variables are used throughout the program.
My application is in several classes to handle individual tasks.
I have my variables in structures in separate files based on varible categories.
My problem is that I need to initialize the variables in one place and have those values be preserved when other classes reference them.
Basically, I want the structures to be global in context.
I have tried to use extern, but my compiler (gnu g++) complains.
How can I accomplish this?
Some simple example code snippits would be greatly appreciated.
Thanks.