Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > BOOK: Ivor Horton's Beginning Visual C++ 2005
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Ivor Horton's Beginning Visual C++ 2005
This is the forum to discuss the Wrox book Ivor Horton's Beginning Visual C++ 2005 by Ivor Horton; ISBN: 9780764571978
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Ivor Horton's Beginning Visual C++ 2005 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 20th, 2010, 05:37 PM
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.
  #2 (permalink)  
Old January 20th, 2010, 09:41 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,652
Thanks: 3
Thanked 141 Times in 140 Posts
Default

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

Weird.

What was the error message??
  #3 (permalink)  
Old January 22nd, 2010, 11:19 AM
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

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.
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loop twice, then inside loop select nodes?? JohnBampton XSLT 2 March 9th, 2009 05:21 AM
compile aspb ASP.NET 2.0 Professional 1 September 12th, 2006 10:22 AM
compile aspb ASP.NET 2.0 Basics 0 September 8th, 2006 10:27 AM
How Compile the First Example ? AlexPerusso BOOK: Beginning Visual C++ 6 3 April 8th, 2005 10:44 AM
nested while loop doesn't loop hosefo81 PHP Databases 5 November 12th, 2003 07:46 AM



All times are GMT -4. The time now is 03:32 AM.


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