Error table in Chinese version of C ++ primer plus (fifth edition)

Source: Internet
Author: User

I heard that the sixth version is the same as the fifth version, but I have an additional chapter C ++ 11. So, I 'd better study the fifth version.

There are errors in the same version 5, reference this errata: http://blog.csdn.net/woxing615701/article/details/3888576

C ++ primer plus (fifth edition) Chinese Version errata (constantly updated) This is an obvious error I found in C ++ primer plus


Error severity of the last 4th lines on the Chinese version 18th page :***
"Http://www.research.att.com/-bs /"
Web page error, it should be "http://www.research.att.com /~ BS.

Chinese version 9th page 21 rows (as if it was an OCR error) Error severity :**
"A source code file, such as mu. cxx, can be recompiled using my. cxx and precious. O"
Replace "Mu. cxx" with "my. cxx"
The English version is
If you subsequently modify just one of the source code files, say my. cxx, You Can recompile using my. cxx and the precious. O:

The Chinese version contains 13th rows on page 12th (a keyword is incorrect, and it looks like a translator who doesn't understand programming). The error severity is as follows :*
"In this old-fashioned way, you have to change to a new compiler"
The compiler is a program. It should be appropriate to "change to a new compiler" based on the quantifiers used on the 8th page of the Chinese version.

26th pages of the Chinese version and 27 pages of illustrations :**
The code for calling the function is "s = SQRT (6 + 25)", but according to the preceding and following text, it should be 6.25
However, this mistake was also made in the English version.

41st pages of the Chinese version, to hundreds of thousands of errors :**
"That is to say, the Preprocessor will not replace pint_maxtm with p32767im ."
Here, the "pint_maxtm" should be changed to pint_maxim, which may be incorrect by the translator.
The English version is
That is, the Preprocessor doesn't replace pint_maxim with p32767im.

Chinese version 47th page 18th line error degree :****
"Finally, the program uses the cout. Put () function to display the C and a character constants ."
Here we have made a very low-level, very serious mistake.
Let's take a look at the original English version.
Finally, the program uses the cout. Put () function to display both C and a character constant.
The correct translation is
Finally, the program uses the cout. Put () function to display the CH and a character constant.
Because in the English version, the program list 3.6 (morechar. cpp) is like this.
// Morechar. cpp -- the char type and INT type contrasted
# Include <iostream>
Using namespace STD;
Int main ()
{
Char c = 'M'; // assign ASCII code for m to C
Int I = C; // store same code in an int
Cout <"the ASCII code for" <C <"is" <I <"/N ";

Cout <"add one to the character code:/N ";
C = C + 1;
I = C;
Cout <"the ASCII code for" <C <"is" <I <'/N ';

// Using the cout. Put () member function to display a char
Cout <"Displaying char C using cout. Put (c ):";
Cout. Put (C );

// Using cout. Put () to display a char constant
Cout. Put ('! ');

Cout <"/ndone/N ";
Return 0;
}

There are no ch variables, but C variables. Therefore, the Chinese version made two mistakes. The Chinese version modified the English version of the program, but it was not changed in the program description later, I even translated a (Table quantity) into variable names, but I don't know what the interpreter was doing.

The number of errors in the last three and first two rows on the 47th and 48th pages of the Chinese version is as follows :*
'A' is 97, that is, the ASCII code of Character. "
I don't know why I have translated the first sentence, but none of the last five sentences have been translated.
The error frequency of this book ranges from 10 pages on average on dozens of pages to two errors on one page.

Error severity of the last 49th lines on the 10th page of the Chinese version :*
"The usage of common character names is similar to the escape sequence ."
It seems that this sentence is okay, but it is different when compared with the English version.
It should be "this mechanism is similar to the escape sequence"
The English version is
The Mechanism is similar to that of escape sequences.

Chinese version 60th page 22nd line error degree :**
"Int variable debt cannot store 3.0e12 ,"
According to the program list 3.13 (assign. cpp), only 7.2e12 rather than 3.0e12 should be given to debt, but the same error was also made in the English version.
The original English version is:
Finally, note that the int variable debt is unable to hold the value 3.0e12.

Error severity of the last 64th lines on the Chinese version 8th page :***
"31600000 seconds = 365 days, 46 minutes, 40 seconds"
However, the program running result I wrote is:
31600000 seconds = 365 days, 17 hours, 46 minutes, 40 seconds
At first I thought I was wrong, but after countless checks, the sample output was wrong. I also used the if statement in my program to judge the case of 0. When I was doing the question, I felt that the question was somewhat advanced.

Error severity of the last 772nd lines on the 7th page of the Chinese version :**
"The first statement sets the score to"
The score is a variable. Although the grade in the statement is translated into a score, it is a variable name after all, so it should be changed to "the first statement to set the grade to"
The original English version is:
The first statement assigns the letter A to grade only on a system using the ASCII code

The number of errors in the last 76th rows on the 5th page of the Chinese version ;*
"<Str1 <" "<str2 // use cout for output"
Yes, it is an error in the program. Here there is no space in the string between str1 and str2. To maintain context consistency, we should add a space in this string constant, so we should change it:
"<Str1 <" "<str2 // use cout for output"

The error severity of the last line on the 90th page of the Chinese version ;*
"* Operators are called indirect velue or dereferencing operators"
The word is spelled incorrectly. It should be value.
The original English version is:
Applying the * operator, called the indirect value or the dereferencing Operator

The number of errors in the last 113rd rows on the 3rd page of the Chinese version ;**
"Smart_function (I );"
As mentioned above, a space is added between for and parentheses, while spaces between function names and parentheses are omitted: but I didn't see the difference between the distance between for and smart_function and the space. It should be
For (INT I = 6; I <10; I ++)
Smart_function (I );
The original English version is:
For (INT I = 6; I <10; I ++)
Smart_function (I );

Chinese version 117th page 10th line error degree ;***
"// Int I ;"
I don't understand why I's declaration statement needs to be annotated. I thought it could be used like this, but I found it wrong. There is no comment in the English version.
The original English version is:
// Formore. cpp -- more looping with
# Include <iostream>
Using namespace STD;
Const int arsize = 16; // example of external Declaration
Int main ()
{
Double factorials [arsize];
Factorials [1] = factorials [0] = 1.0;
Int I;
For (I = 2; I <arsize; I ++)
Factorials [I] = I * factorials [I-1];
For (I = 0; I <arsize; I ++)
Cout <I <"! = "<Factorials [I] <"/N ";
Return 0;
}

Error severity of the last 127th lines on the 10th page of the Chinese version :*
"Then strcpm () returns a positive value"
Should be strcmp () function
The original English version is:
Strcmp () returns a positive value.

Chinese version 129th page 19th line error degree :***
"For (char CH = 'a'; word! ="
In the source code, only half of the for statement is written, and the second half disappears.
The original English version is:
For (char CH = 'a'; word! = "Mate"; ch ++)

Chinese version 133rd page 15th line error degree :**
"Or multiply the number of seconds by clock_per_sec to get the time in the unit of system time ."
Here, the constant clock_per_sec is a non-existent constant. It should be clocks_per_sec which missed a "S"
The original English version is:
You can multiply seconds by clocks_per_sec to get time in the system units

Chinese version 134th page 19th line error degree :*
"Exit condition loop"
There is a connector between the "For Loop is entry-condition loop" entry and the "For Loop" in the last 19 rows on the 113rd page of the Chinese version. Accordingly, there should also be indirect characters between the exit and loop.
The original English version is:
It's different from the other two because it's an exit-condition Loop

Degree of error in the last line on the 144th page of the Chinese version :****
"Char cities [25] [cities] = // array of 5 arrays of 25 char"
The two-dimensional array created in this way is not a required two-dimensional array. It should be
Char cities [cities] [25] =

Chinese version 153rd page table 6.1
It is not an error, but it does make reading difficult.
In the Chinese version, the table is split into two parts, and "expr1 | expr2 value" is placed in a column separately. After the table is separated, the items are not completely supplemented, when I first read this table, there were so many spaces that I really didn't understand,
The actual intention should be like this (according to the English version, the "the value of expr1 | expr2" row is merged)
The value of expr1 | expr2
Expr1 = true expr1 = false
Expr2 = true
Expr2 = false True False

Error severity of the last 153rd lines on the 3rd page of the Chinese version :**
"Colons and comma operators are also order points"
-_-!
It should be:
Semicolon and comma operator are also order points

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.