Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2005 > BOOK: Beginning Visual C# 2005
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Visual C# 2005
This is the forum to discuss the Wrox book Beginning Visual C# 2005 by Karli Watson, Christian Nagel, Jacob Hammer Pedersen, Jon D. Reid, Morgan Skinner, Eric White; ISBN: 9780764578472
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: 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 Search this Thread Display Modes
  #1 (permalink)  
Old May 5th, 2007, 08:51 AM
Authorized User
Join Date: Dec 2006
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapt 5, exercise 10


Just as a curiosity, did anyone understand the exercise 10 in chapter 5?

to make the whole story real short, here's what it is about :
int main (int argc, char* argv[])
  cout << sum(2,4,6,8,10,12) << endl;
  cout << sum(11,22,33,44,55,66,77,66,99) << endl;
** edit**
Strangely, the c++/cli example that uses the sum function works perfectly.

There must be an erratum section on this site, I think I'll try to find it.

Mister Hortons says that this example should produce the following output

My question is : why would sum(2,4,6,8...) only result in 10 ??

I didn't include the function sum in my example, but I would assume a sum function to calculate the sum of all arguments supplied to the function.

Em I missing anything? Most probably ;)

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Problems in Chapt 9 pjwarez BOOK: Beginning Mac OS X Programming 0 August 30th, 2006 02:46 PM
Chapt 5 Help needed with Form4 example Getting_there_slowly BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 May 28th, 2005 10:42 AM
Chapt 13 auto_prepend_file dooz BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 November 20th, 2003 08:34 PM
Chapter 10 Enhanced File Info Display exercise err ssn651 BOOK: Beginning ASP 3.0 8 August 27th, 2003 10:35 AM

All times are GMT -4. The time now is 06:12 PM.

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