View Single Post
  #1 (permalink)  
Old January 20th, 2010, 06:37 PM
earlmw earlmw is offline
Authorized User
Points: 96, Level: 1
Points: 96, Level: 1 Points: 96, Level: 1 Points: 96, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2010
Posts: 19
Thanks: 0
Thanked 2 Times in 2 Posts
Default 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.