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: Professional C++
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 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 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)
 


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
Minor error in common.php? Dave521r BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 1 April 2nd, 2009 01: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 03: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 03:38 PM



All times are GMT -4. The time now is 08:55 PM.


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