I have an MFC application that has many different classes which need to access a struct filled with particular values. All of the classes need to have access to these values so I thought that this would be an opportunity to use a global variable in a decent way. However I put the struct declaration
header and then make an instance of that struct in the implementation file
class CMyApp : public CWinApp
is only working for me in a few classes and other times it will tell me,
extern some_struct instanceOfStruct;
Any thoughts? I know this is poorly worded, and I apologize for that, but I'm just too tired to try and fix it right now. Thank you for any help you might be able to give me. Also, criticism and better ways to do this are welcome.
error C2146: syntax error : missing ';' before identifier 'instanceOfStruct'
error C2065: 'instanceOfStruct' : undeclared identifier