On 12/10/2013 at 09:08, xxxxxxxx wrote:
Well, in everything I've read about c++ programming, there seems to be a consensus that global variables are frowned upon.
What I'd suggest is to create a static variable in your main.cpp file, and create accessor functions like this:
static bool test;
// rest of startup functions....
void SetTest(bool t)
test = t;
Then in your main header file (MyPlugin.h or whatever your plugin is named) you prototype the accessor functions:
void SetTest(bool t);
Then you simply include the main header file in each .cpp file where you need access to the "test" variable:
// do something