C++ Primer Plus (Fifth Edition), Chinese Edition

Stephen PrataPosts & Telecom Press2005

Rating 4.3
Word count
1.6M words
Chapters
27
ISBN
9787115134165

Tags

Computing Programming Memory ModelProgramming DesignComputer TextbookObject-Oriented ProgrammingStandard TemplateClassic ManualProgramming PracticeProgramming Primer

Summary

This book is the Chinese translation of C++ Primer Plus, 5th Edition, an introductory C++ tutorial written to the ISO/ANSI C++ standard published in 2003. It consists of 17 chapters and 10 appendices. Author Stephen Prata begins with the fundamentals of the C language, first introducing simple variables, compound types, loops and relational expressions, branching statements and logical operators, then gradually moving on to functions, overloading, function templates, the memory model and namespaces. The latter half focuses on object-oriented programming, including the basic design of classes and objects, operator overloading and the use of class methods, classes and dynamic memory allocation, class inheritance, code reuse, and advanced topics such as friends, exceptions and runtime type identification, closing with the string class, the Standard Template Library (STL), and input/output and file operations. In terms of approach, the book explains one or two concepts at a time through numerous short, directly runnable programs, accompanied by diagrams, notes and tips, with review questions and programming exercises at the end of each chapter. The exposition is not tied to any particular computer, operating system or compiler, and appendices cover number systems, reserved words, the ASCII character set, operator precedence, and STL methods and functions. The book assumes no prior C background and can serve both as a textbook for university C++ courses and as a systematic self-study guide for developers with experience in other languages.

Editor's review

这是一部把“讲清楚”放在第一位的 C++ 入门书。它与偏重语言规格的参考手册不同,Prata 采用“一次只讲一两个概念”的节奏,用短小可运行的程序配合示意图、注意和提示,把指针、内存模型、类与对象这些最容易劝退初学者的内容拆成可消化的台阶。全书从 C 基础起步,先保证读者能写出、跑通程序,再顺势进入面向对象与通用编程,因此不要求读者事先学过 C,对跨语言转过来的开发者也很友好。第 5 版按 2003 年的 ISO/ANSI 标准改写,对模板、STL、string 类、异常、RTTI 和名称空间都做了专门讨论,编排上兼顾课程教学与自学:每章有总结、复习题与编程练习,附录里备齐计数系统、保留字、ASCII 表、操作符优先级和 STL 方法速查。需要说明的是,本版成书于 2005 年,尚未覆盖 C++11 及之后的标准,更适合用来打牢语言根基,而非查询新特性。它在豆瓣长期保持 8.6 分左右的口碑,是许多程序员“第一本 C++ 书”的经典选择。

Who it's for

A good fit for

Not a good fit for

Reading tips

  1. 从第 1—5 章连续精读,务必亲手编译运行每章的示例,打好语法和 C 基础。
  2. 每章先看正文再做复习题,最后独立完成编程练习,错题回溯到对应小节重读。
  3. 第 10 章起按类、继承、模板的顺序推进,中途可用附录 D、G 随时查操作符与 STL。
  4. 学完本书后衔接一本覆盖 C++11 及之后标准的现代教材,补齐新特性与工程实践。

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. Chapter 1 Getting Started
  2. Chapter 2 Setting Out to C++
  3. Chapter 3 Dealing with Data
  4. Chapter 4 Compound Types
  5. Chapter 5 Loops and Relational Expressions
  6. Chapter 6 Branching Statements and Logical Operators
  7. Chapter 7 Functions: C++'s Programming Modules
  8. Chapter 8 Adventures in Functions
  9. Chapter 9 Memory Models and Namespaces
  10. Chapter 10 Objects and Classes
  11. Chapter 11 Working with Classes
  12. Chapter 12 Classes and Dynamic Memory Allocation
  13. Chapter 13 Class Inheritance
  14. Chapter 14 Reusing Code in C++
  15. Chapter 15 Friends, Exceptions, and More
  16. Chapter 16 The string Class and the Standard Template Library
  17. Chapter 17 Input, Output, and Files
  18. Appendix A Number Bases
  19. Appendix B C++ Reserved Words
  20. Appendix C The ASCII Character Set
  21. Appendix D Operator Precedence
  22. Appendix E Other Operators
  23. Appendix F The string Template Class
  24. Appendix G The STL Methods and Functions
  25. Appendix H Selected Readings and Internet Resources
  26. Appendix I Converting to ANSI/ISO Standard C++
  27. Appendix J Answers to Review Questions

FAQ

这本书是 C++ Primer 吗?两者有何区别? 不是。本书是 Stephen Prata 所著 C++ Primer Plus,由人民邮电出版社 2005 年出版,孙建春、韦强翻译;C++ Primer 则是 Stanley Lippman 等人的另一本书,两书作者、内容和难度定位不同,购买时注意区分书名中的 Plus。
零基础、没学过 C 语言能直接读吗? 可以。作者从 C 语言基础知识讲起,不要求读者具备 C 背景,但需要基本计算机操作和程序编译运行的能力。完全零编程经验者建议同步练习每章示例,进度会慢一些。
第 5 版内容是否已过时? 本书依据 2003 年 ISO/ANSI C++ 标准编写,未包含 C++11 及之后的新特性。作为打基础的教程仍然适用,但涉及现代特性的实际开发需另找覆盖 C++11/14/17 的教材或文档补充。
书中示例需要特定编译器或操作系统吗? 不需要。作者刻意让内容不依赖特定计算机、操作系统或编译器,常见 C++ 编译器均可运行示例;个别示例涉及平台细节的地方,书中会给出说明,按注释调整即可。
这本 2005 年版与后续版本有什么差别? 本版共 17 章加 10 个附录,788 页,定价 72 元,ISBN 为 9787115134165。后续版本主要围绕更新的 C++ 标准扩充内容与调整章节编排,若需学习新标准,可考虑较新的版本或补充读物。

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

About the author

Stephen Prata Author

Stephen Prata is an author of computer books whose work is known to Chinese readers mainly through his C++ textbooks. Public information about him is limited, and his nationality, dates of birth and death, and professional career are not clearly documented. Two of his works are included in the collection, both Chinese editions of C++ Primer Plus, corresponding to the sixth and fifth editions, generally classified under computing and programming design. These works show that he writes for learners of the C++ language, organizing syntax, language features, and programming practice in a step-by-step manner. The books are fairly comprehensive in scope and suitable as references for systematic study of C++. The series has had some influence among introductory and intermediate programming readers and is often used as course support or self-study material.