View Single Post
  #7   Spotlight this post!  
Unread 24-01-2008, 21:59
Joohoo's Avatar
Joohoo Joohoo is offline
Registered User
FRC #0340 (G.R.R.)
Team Role: Mentor
 
Join Date: Jun 2005
Rookie Year: 2005
Location: Rochester
Posts: 241
Joohoo is just really niceJoohoo is just really niceJoohoo is just really niceJoohoo is just really niceJoohoo is just really nice
Send a message via AIM to Joohoo Send a message via Yahoo to Joohoo
Re: #define's scope?

ok thanks now lets see if anyone knows the answer to this one. If I have a code structure like so.
Quote:
#define VAR 100
{code1}
#define VAR 50
{code2}
Which the compiler doesn't crash on me, i've tried this, in the second segment of code(code2) what does the compiler put in place of VAR. 50 or 100? Is this an effective way to have my cake and eat it too?