Topic: C# and C++

Ivor Horton's Beginning Visual C++ 2010 (0470500883) cover image

Ivor Horton's Beginning Visual C++ 2010

Ivor Horton
ISBN: 978-0-470-50088-0
1231 pages
April 2010
This title is out-of-print and not currently available for purchase from this site.

Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.

ChapterPageDetailsDatePrint Run
xxxvii Error in Text
Top of page, typo/grammar ? ?You then can to progress to Windows application development??
Should be ?You then can progress to Windows application development??
xxxvii Error in Text
Bottom of page, step #3 in ?Try it out?
The word 'program' should replace the word ?database?.
31 Error in Code
Middle of page, ?? or select View->Toolbox??, Toolbox not listed here in VS 2010 unless you put the IDE in 'Expert Settings' mode?

Selecting the option for C++ settings initially with paid for editions of Visual Studio 2010 should make all the menu options available for that context, including the Toolbox and I am not aware of an "Expert Settings" option in this context. The free Express Edition of Visual Studio 2010 does have an "Expert Settings" option but the book is not specifically aimed at this version because it the limitations mean that many of the examples in the latter part of the book will not work. In particular, the MFC is not supported.
57 Error in Number
Last line of paragraph 4:
values from 3.4x10^-38

should read:
values from -3.4x10^38
58 Error in Code
Table on page 58: "Int" should be "int"
58 Error in Text
Reads: unsigned long long is 4 bytes
Should read: unsigned long long is 8 bytes
72 Error in Text
Line 5 of paragraph 3:
converted to floating-point form

should read:
converted to integer form
88 Error in Text
Second-to-last paragraph:
In the third statement

should read:
In the second statement
106 Error in Text
7th line from the bottom should read:
"The packageWeight variable is now referenced by 1 and packageCount by 0 in the format string..."

(1 and 0 are reversed in the text.)
150 Error in Code
Currently reads:

for (double x = 0.0 ; x!= 1.0 ; x+= 0.2)
cout <<x;
Should read:
   for(double x = 0.0; x != 1.0; x += 0.1)
     cout << x << endl;
185 Error in Text
The output should be: number1 = 66 &number1 = 0039FB08 number1 = 990 pnumber = 0039FB0C *pnumber = 99
185 Error in Text
Currently, the last sentence on page 185 reads:
"The 0x pre xing the address values indicates that they are hexadecimal numbers."

This text should be deleted.
208 Error in Text
Since the new version was released, the original phrasing of the example:

int&& rx=x;

is no longer correct. The new example should read:

int&& rx = std::move(x);
210 Error in Figure
Figure 4-9 was drawn incorrectly: The arrowheads should all be shifted left by one box.
228, 230 Errors in Code
Page 228, in program Ex4_16.cpp, first line after // Write top line of table AND Page 230, in 3rd paragraph, first line after //Write top line of table:

it should read Console::Write(L" |"); Four spaces instead of one space between the " and the |.
233 Error in Code
code snippet:
Console::WriteLine(L"Students with Grade {0}:", gradeLetter+j);

should be:
Console::WriteLine(L"Students with Grade {0}:", wchar_t(gradeLetter+j));
272 Typo
How It Works:
The Incr10() function

should be:
The incr10() function
313 Error in Text
There is a typo in the last line of the section headed "Refernce Types and Overload Selection on page 313. The last word in the section, just before the box containing a Note, is "revalues" whereas it should read "rvalues".
442 Error in Figure
The text in the middle of Figure 8-1 should read:
CMessage motto2(motto1); // Calls the default copy constructor
478 Typo in Code
Code line 8:
Count : 100

should be:
count : 100
483 Error in Text
p 483 (Ex8_10), 1st para. When use the Ex 8_06 CBox class definition printed on p.461, you need to remove the "explicit" constructor qualifier to avoid a compiler error. The download version of the code is OK.
This error was a devil to track down as import of the Visual Studio error diagnosis was only apparent when the problem was solved.
493 Error in Figure
Figure 8-8:

should be:
501 Error in Code
The #include directive should be:
#include "Box.h
506 Error in Figure
Figure 8-13:

should be:
571 Typo
Line 3:
the fried function

should be:
the friend function
590 Error in Text
Paragraph 2--The second sentence should read: "The second statement casts pContainer down the class hierarchy ..." as per Figure 9-5.
665 Error in Text
The text "The private initPerson() function"
Should read "The private initName() function".
770 Error in Code
On page 770, last four lines -
"The string can then be treated as the representation of a number to some base, 32 say. The numerical value for the string 'fred', for instance is 6*323+18*322+5*321+4*320 and, assuming you expected to store 500 strings, you could calculate the hashed value of the key as:
6*323+18*322+5*321+4*320 mod 503"
These equation '6*323+18*322+5*321+4*320' should be expressed in a form like '6*32^3+18*32^2+5*32^1+4*32^0' where exponents of 32 are used.
820 Error in Code
The text in the code in page 820 is wrong. It's written:
hWnd = CreateWindow(
"A Basic Window the Hard Way",...

where the text "A Basic Window the Hard Way" should be:
L"A Basic Window the Hard Way"
851 Error in Code
On line 5, the expression:
a, c + di. + bi(c + di)

should be:
a(c + di) + bi(c + di)
969 Error in Figure
Figure 16-12:
The arrows should point toward the base class; therefore, the arrow should point from CElement to CObject.
1005 Typo in Code

should read:
1015 Error in Figure
Figure 17-2:
void UpdateAllView(...

should be:
void UpdateAllViews(...