defining global variables
-
i'm using VC++6; i want to declare a global variable(i.e., to be seen in all the classes of the app) i tried to declare it n CMyApp ( : public CWinApp) but an error message (undeclared identifier) usually appears.. regards. keep the matter as simple as it can be !!
-
i'm using VC++6; i want to declare a global variable(i.e., to be seen in all the classes of the app) i tried to declare it n CMyApp ( : public CWinApp) but an error message (undeclared identifier) usually appears.. regards. keep the matter as simple as it can be !!
what errror ? and where does the error appears ? you need to
#include
your app class .h file in the files you will accessCMyApp
Maximilien Lincourt Your Head A Splode - Strong Bad
-
i'm using VC++6; i want to declare a global variable(i.e., to be seen in all the classes of the app) i tried to declare it n CMyApp ( : public CWinApp) but an error message (undeclared identifier) usually appears.. regards. keep the matter as simple as it can be !!
hi ypu can declare the "extern int " in your stdafx.h the applications global file where you have to use that variable again declare there in that header file your change will affect to the original global variable. I think this works Best Regards ganesh