|
-
March 29th, 2004, 08:29 PM
#1
Global Variable across multiple files?
Guys,
yet another question.
How do I use global varibales across multiple files.
and where exactly do I define the "extern int count;" ?
lets suppose I have the following
myclass.h
myclass.cpp
mymain.cpp -> this is where the main() program exists.
basically I want my class to update a global variable everytime its called, and then I want to be able to read that variable from my main as well ?
any suggestions? I m trying the "extern" but getting some LINK error saying I have unsolved external symbols.
pls help
Thanks
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
|