943,812 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 762
  • C++ RSS
Oct 3rd, 2008
0

global variable

Expand Post »
what is a global variable? is that when the variables are located outside of int ()??
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
justinlake888 is offline Offline
8 posts
since Sep 2008
Oct 3rd, 2008
0

Re: global variable

Do you not know how to use google (or any other search engine)? You will find more than you need if you actually try looking for it.

Try http://en.wikipedia.org/wiki/Global_variable
Last edited by dougy83; Oct 3rd, 2008 at 7:44 pm.
Reputation Points: 85
Solved Threads: 45
Posting Whiz in Training
dougy83 is offline Offline
275 posts
since Jun 2007
Oct 3rd, 2008
0

Re: global variable

Global variables are variables that are declared outside a function, meaning that they can be accessed anywhere in the program by any function. Any variable declared outside of int main() is a global variable. Using global variables is not good programming technique, although it can be done.
Reputation Points: 104
Solved Threads: 27
Posting Whiz in Training
dmanw100 is offline Offline
239 posts
since Apr 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Problem making Textpad
Next Thread in C++ Forum Timeline: File read-in with loops, max, and min.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC