Re: local & variable in main


[ Follow Ups ] [ Post Followup ] [ CS1044 Web Discussion Board ] [ FAQ ]

Posted by Firas Al-Barzinji on October 29, 2001 at 02:52:24:

In Reply to: local & variable in main posted by John on October 26, 2001 at 23:49:42:

: I declare one variable in main to pass it around (int&...), then I declare another local variable inside a for loop, then I compare the two, but it's not working, anyone knows why ?

: int&...

: for (int a; int a <= ...; a ++)

you need to either initialize the variable with a value when you start the for loop (for (int a=0;...) or initialize it somewhere else without defining it again in the loop - ( for( a; ...)




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS1044 Web Discussion Board ] [ FAQ ]