global variable

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2008
Posts: 8
Reputation: justinlake888 is an unknown quantity at this point 
Solved Threads: 0
justinlake888 justinlake888 is offline Offline
Newbie Poster

global variable

 
0
  #1
Oct 3rd, 2008
what is a global variable? is that when the variables are located outside of int ()??
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 275
Reputation: dougy83 is on a distinguished road 
Solved Threads: 45
dougy83 dougy83 is offline Offline
Posting Whiz in Training

Re: global variable

 
0
  #2
Oct 3rd, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 160
Reputation: dmanw100 is on a distinguished road 
Solved Threads: 12
dmanw100's Avatar
dmanw100 dmanw100 is offline Offline
Junior Poster

Re: global variable

 
0
  #3
Oct 3rd, 2008
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC