Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 6th, 2007, 04:55 AM
Registered User
 
Join Date: Nov 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ch5 Ex5_03

Would greatly appreciate help from anyone...
In this example, I don't understand why the string constant
"incr10(pnum) = "
doesn't appear in the output prior to the output that occurs due to the function being executed.

Thank you,
yetri56

 
Old April 14th, 2008, 02:36 AM
Registered User
 
Join Date: Mar 2008
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

cout << endl
     << "incr10(pnum) = " << incr10(pnum);

As I understood, to start the output, the 'cout' needs the return of the function incr10(pnum), because the return of the function has to become immediately after the string "incr10(pnum) =".

So, first of all, the 'cout' calls the function. The function is starting and outputs first of all :

    cout << endl
         << "Address received = " << num;


and only after getting the return from the function, the 'cout' will start the output...

I hope I answered a little bit your question...

rgds,

Marc






Similar Threads
Thread Thread Starter Forum Replies Last Post
CH5 ObjectDataSource nabeelalkaff BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 March 8th, 2007 01:19 PM
ch5 Fooreader zxmlDom is undefined razzzzer BOOK: Professional Ajax ISBN: 978-0-471-77778-6 2 February 8th, 2007 05:01 AM
CH5 p 184 wadesmart BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 November 17th, 2003 04:41 PM
CH5 pg 150 While Loops wadesmart BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 11 November 8th, 2003 04:51 PM





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