R
razael1
Hi,
I am declaring a global variable in a .h file like this:
extern MyClass object;
Then I include the .h file in other files and try to use object. I get
"object not declared", but then when I add:
MyClass object;
to the file I am including the .h file in, I get "multiple definitions
of object". How can I fix this?
Thanks,
Colin
I am declaring a global variable in a .h file like this:
extern MyClass object;
Then I include the .h file in other files and try to use object. I get
"object not declared", but then when I add:
MyClass object;
to the file I am including the .h file in, I get "multiple definitions
of object". How can I fix this?
Thanks,
Colin