Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,583 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,925 people online right now. Registration is fast and FREE... Join Now!




local and global vairable

 
Reply to this topicStart new topic

local and global vairable

alowais
27 Sep, 2008 - 01:06 PM
Post #1

New D.I.C Head
*

Joined: 13 Sep, 2008
Posts: 26

Ist different to define the vairable as global or local ?
What' the difference between 'em?

User is offlineProfile CardPM
+Quote Post

red_4900
RE: Local And Global Vairable
27 Sep, 2008 - 02:10 PM
Post #2

Code T(h)inkers
****

Joined: 22 Feb, 2008
Posts: 820



Thanked: 11 times
My Contributions
Local variables is easier to keep track than global variables. You may not see the effect in small program, but in large program global variables is very~ hard to maintain. If one functions change the value of the global variables, and you did not notice it, your program may not give out the value that you want. At that time, you will have to spend lots of time to figure out why your program gives you the undesired result.
User is online!Profile CardPM
+Quote Post

alowais
RE: Local And Global Vairable
27 Sep, 2008 - 02:13 PM
Post #3

New D.I.C Head
*

Joined: 13 Sep, 2008
Posts: 26

Thank you for your help
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/3/08 12:43AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month