Your program as posted compiles without error for me. using VC++ 2008 Express. Looks like a logic error though -- you need more brackets around that last while loop (lines 14-18).
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
The brackets are fine. Add "return 0;" at the end of the main.
Nemoticchigga
Junior Poster in Training
98 posts since Feb 2008
Reputation Points: 10
Solved Threads: 2
The brackets are fine. .
Apparently you didn't bother to read/understand the program. There are not enough brackets { and }.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
First you have too many loops. You don't need that outer loop that starts on line 11. So delete lines 11 and 20.
line 14: replace [icode]number/2[/b] with [b] LIMIT.
put open bracket at line 15 and close at line 20.
Align the program indentions correctly so that you can see what's going on.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343