Wrox Programmer Forums
|
BOOK: Ivor Horton's Beginning Visual C++ 2010
This is the forum to discuss the Wrox book Ivor Horton's Beginning Visual C++ 2010 by Ivor Horton; ISBN: 9780470500880
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Ivor Horton's Beginning Visual C++ 2010 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 March 10th, 2011, 04:07 AM
Registered User
 
Join Date: Mar 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ex8_01, page 436: syntax error ?

Hi,

Regarding Example 8_01 (page 436):

1. Is there a syntax error in the following bold line:
int main (int argc, const char * argv[])
{
CBox boxes[5];

CBox *cigar = new CBox (8.0, 5.0, 1.0);
CBox *match = new CBox (2.2, 1.1, 0.5);

CBox *pB1 = cigar;
CBox *pB2 = 0;

cout << endl << "Volume of cigar is " << pB1->Volume();

pB2 = boxes;
boxes[2] = *match;

...
I can only get the desired result by seemingly dereferencing the match pointer. This is not in the text.

2. On exit, I only have five messages referring to the destructor call. Shouldn't there be seven ?

Thanks,

Scott





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 13 Page 436 Single operator caiman BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 September 9th, 2010 09:52 AM
"Single and SingleOrDefault" (p. 436) roman BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 July 3rd, 2008 07:48 PM
Ch 4: Parse error: syntax error, unexpected T_SL hanizar77 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 June 23rd, 2008 09:17 PM
chapter 6, page 173-175, error in sql syntax vkranendonk BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 May 26th, 2004 12:30 PM





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