Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional C++
This is the forum to discuss the Wrox book Professional C++ by Nicholas A. Solter, Scott J. Kleper; ISBN: 9780764574849
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional C++ 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
  #1 (permalink)  
Old February 25th, 2009, 03:59 PM
Registered User
 
Join Date: Feb 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Some minor inconsistencies

I've finally gotten around to reading your book, and I am enjoying it. Especially the software engineering tips in the beginning chapters.

However, I've noticed a couple of inconsistencies in the coding style. For example, on page 165 in the code example for objects on the heap we see:

Code:
 SpreadsheetCell*   myCellp = new SpreadsheetCell();
But on page 167 we see:

Code:
 SpreadsheetCell   *myCellp = new SpreadsheetCell();
Seems like a minor nit, but for people trying really hard to understand the code, minor things like this can really hang one up.
  #2 (permalink)  
Old February 27th, 2009, 08:40 PM
Authorized User
 
Join Date: Oct 2004
Location: San Francisco, CA, .
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by rchrd@sun.com View Post
Seems like a minor nit, but for people trying really hard to understand the code, minor things like this can really hang one up.
Thanks for pointing that out -- we'll be sure to be more consistent in the future. For what it's worth, I prefer attaching the * to the type because, in my mind, the pointer is part of the type. It's not a SpreadsheetCell, it's a SpreadsheetCell*. However, that notion breaks down a bit in certain cases, like when you declare multiple values:

<code>
SpreadsheetCell* a, b; // actually declares 1 pointer and 1 object
</code>

<code>
SpreadsheetCell *a, *b; // does what you want, but moves the * formatting
</code>
__________________
----
Scott J. Kleper
Author, \"Professional C++\"
(Wrox, 2005)


Similar Threads
Thread Thread Starter Forum Replies Last Post
Minor error in common.php? Dave521r BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 1 April 2nd, 2009 12:35 PM
zXML zXMLSerializer minor errors AGS BOOK: Professional Ajax ISBN: 978-0-471-77778-6 0 October 29th, 2006 03:36 PM
app.minor Ardvisoor ASP.NET 2.0 Professional 0 June 1st, 2006 02:23 AM
Inconsistencies clvrmonkey BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 May 9th, 2006 02:38 PM





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