p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Ivor Horton's Beginning Visual C++ 2005 (http://p2p.wrox.com/forumdisplay.php?f=249)
-   -   for loop Ex3_09 would not compile for me (http://p2p.wrox.com/showthread.php?t=77877)

earlmw January 20th, 2010 06:37 PM

for loop Ex3_09 would not compile for me
 
The example "Try it Out" in Ex3_09.cpp would not compile. I had to change the loop from ' for(i = 0, power = 1; i <= max; i++, power += power) '
The only way it would compile for me was to redo the for loop to
for(power = 1; i <= max; i++, power += power)
Can anyone explain why this occurred.

Old Pedant January 20th, 2010 10:41 PM

So all you did was drop out "i = 0," ???

Weird.

What was the error message??

earlmw January 22nd, 2010 12:19 PM

Yes it is weird. I reentered the i = 0, to get the error message but now it's working correctly. Weird indeed. Thanks for the reply.


All times are GMT -4. The time now is 09:31 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.