How can I access global variables and function in my VC++ applications
Thankx in advance
Printable View
How can I access global variables and function in my VC++ applications
Thankx in advance
As long as the variable and function are not being declared as static in file scope, you need to declare them as extern in your calling file.
Code:// Original file
int temp;
void foo(void);
// Calling file
extern int temp;
extern void foo(void);
void bar(void)
{
foo();
}
Of course, shared header files are much better :D
Thankx it works !!!Quote:
Originally Posted by Kheun