《C++ Primer(评注版第4版)》是一本系统而权威的C++教材,它全面而深入地讲解了C++语言及其标准库。本书作者Stanley B. Lippman(李普曼)在20世纪80年代早期即在C++ 之父Bjarne Stroustrup 领导下开发C++ 编译器,另一作者Josée Lajoie(拉乔伊)曾多年担任C++标准委员会核心语言组主席,他们对这门编程语言的理解与把握非常人可比。本书对C++ 语法和语义的阐释兼具准确性与可读性,在坊间无出其右者。第4版更吸收了先进的C++ 教学经验,在内容组织上对初学者更加友好,详略得当且重点突出,使读者能更快上手编写有用的程序,也更适合自学。全球已有45万人通过该书的各个版本学习了C++ 编程。
对于国外技术图书,选择翻译版还是影印版,常常让人陷入两难的境地。本评注版力邀国内资深专家执笔,在英文原著基础上增加中文点评与注释,旨在融合二者之长,既保留经典的原创文字与味道,又以先行者的学研心得与实践感悟,对读者阅读与学习加以点拨、指明捷径。
经过评注的版本,更值得反复阅读与体会。希望这本《C++ Primer(评注版第4版)》能够帮助您跨越C++的重重险阻,领略高处才有的壮美风光,做一个成功而快乐的C++程序员。
Preface
Chapter 1 Getting Started (新增评注29 条)
1.1 Writing a Simple C++Program
1.1.1 Compiling and Executing Our Program
1.2 AFirstLookat Input/Output
1.2.1 StandardInput andOutputObjects
1.2.2 AProgramthatUses the IOLibrary
1.3 AWordAboutComments
1.4 Control Structures
1.4.1 The whileStatement
1.4.2 The forStatement
1.4.3 The ifStatement
1.4.4 ReadinganUnknownNumberof Inputs
1.5 IntroducingClasses
1.5.1 The Sales_itemClass
1.5.2 AFirstLookatMemberFunctions
1.6 The C++Program
Part Ⅰ The Basics
Chapter 2 Variables and Basic Types(新增评注42 条)
2.1 PrimitiveBuilt-inTypes
2.1.1 IntegralTypes
2.1.2 Floating-PointTypes
2.2 LiteralConstants
2.3 Variables
2.3.1 What Is aVariable?
2.3.2 TheNameof aVariable
2.3.3 DefiningObjects
2.3.4 VariableInitializationRules
2.3.5 Declarations andDefinitions
2.3.6 Scopeof aName
2.3.7 DefineVariablesWhereTheyAreUsed
2.4 constQualifier
2.5 References
2.6 TypedefNames
2.7 Enumerations
2.8 ClassTypes
2.9 Writing Our Own Header Files
2.9.1 DesigningOurOwnHeaders
2.9.2 ABrief IntroductiontothePreprocessor
Chapter 3 Library Types (新增评注30 条)
3.1 Namespace usingDeclarations
3.2 Library stringType
3.2.1 Defining and Initializing strings
3.2.2 Reading andWriting strings
3.2.3 Operations on strings
3.2.4 Dealing with the Characters of a string
3.3 Library vectorType
3.3.1 Defining and Initializing vectors
3.3.2 Operations on vectors
3.4 IntroducingIterators
3.4.1 IteratorArithmetic
3.5 Library bitsetType
3.5.1 Defining and Initializing bitsets
3.5.2 Operations on bitsets
Chapter 4 Arrays and Pointers (新增评注33 条)
4.1 Arrays
4.1.1 DefiningandInitializingArrays
4.1.2 OperationsonArrays
4.2 IntroducingPointers
4.2.1 What Is aPointer?
4.2.2 DefiningandInitializingPointers
4.2.3 OperationsonPointers
4.2.4 UsingPointers toAccessArrayElements
4.2.5 Pointers and the constQualifier
4.3 C-StyleCharacterStrings
4.3.1 DynamicallyAllocatingArrays
4.3.2 InterfacingtoOlderCode
4.4 MultidimensionedArrays
4.4.1 Pointers andMultidimensionedArrays
Chapter 5 Expressions (新增评注49 条)
5.1 ArithmeticOperators
5.2 Relational andLogicalOperators
5.3 TheBitwiseOperators
5.3.1 Using bitsetObjectsor IntegralValues
5.3.2 Usingthe ShiftOperators for IO
5.4 AssignmentOperators
5.4.1 Assignment IsRightAssociative
5.4.2 AssignmentHasLowPrecedence
5.4.3 CompoundAssignmentOperators
5.5 Increment andDecrementOperators
5.6 TheArrowOperator
5.7 TheConditionalOperator
5.8 The sizeofOperator
5.9 CommaOperator
5.10 EvaluatingCompoundExpressions
5.10.1 Precedence
5.10.2 Associativity
5.10.3 OrderofEvaluation
5.11 The new and deleteExpressions
5.12 TypeConversions
5.12.1 WhenImplicitTypeConversionsOccur
5.12.2 TheArithmeticConversions
5.12.3 Other ImplicitConversions
5.12.4 ExplicitConversions
5.12.5 WhenCastsMightBeUseful
5.12.6 NamedCasts
5.12.7 Old-StyleCasts
……
Chapter 6 Statements (新增评注29 条)
Chapter 7 Functions (新增评注56 条)
Chapter 8 The IO Library(新增评注11 条)
Part Ⅱ Containers and Algorithms
Chapter 9 Sequential Containers (新增评注54 条)
Chapter 10 Associative Containers (新增评注22 条)
Chapter 11 Generic Algorithms (新增评注18 条)
Part Ⅲ Classes and Data Abstraction
Chapter 12 Classes 429(新增评注26 条)
Chapter 13 Copy Control (新增评注30 条)
Chapter 14 Overloaded Operations and Conversions (新增评注31 条)
Part Ⅳ Object-Oriented and Generic Programming
Chapter 15 Object-Oriented Programming (新增评注56 条)
Chapter 16 Templates and Generic Programming (新增评注31 条)
Part Ⅴ Advanced Topics
Chapter 17 Tools for Large Programs (新增评注37 条)
Chapter 18 Specialized Tools and Techniques (新增评注22 条)
Appendix A The Library