|
-
October 3rd, 2004, 11:22 AM
#4
Re: How to access Global variables and functions
 Originally Posted by Kheun
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();
}
Thankx it works !!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|