C ++ primer (version 4th) (version comments)

Source: Internet
Author: User

C ++ primer (version 4th) (commentary Version)
Basic Information
Original Title: C ++ primer (4th edition)
Original Publishing House: Addison-Wesley professional; 4 Edition
Author: (US) Stanley B. Lippman Joseph E Lajoie Barbara E. Moo
Translator: Chen Shuo
Series name: Classic Books
Press: Electronic Industry Press
ISBN: 9787121174414
Mounting time:
Published on: February 1, July 2012
Start: 16
Page number: 662
Version: 1-1
Category: Computer> Software and programming> C ++

 
 


More about C ++ primer (version 4th) (commentary Version)
Introduction
Books
Computer books
C ++ primer is a systematic and authoritative C ++ textbook that comprehensively and deeply explains the C ++ language and its standard library. Written by Stanley B. in the early 1980s S, Lippman developed the C ++ compiler under the leadership of Bjarne stroustrup, father of C ++. Another author, Jos é e Lajoie, served as the core language group chairman of the C ++ Standards Committee for many years, their understanding of this programming language is comparable to that of ordinary people. The interpretation of C ++ syntax and semantics is both accurate and readable. The 4th edition incorporates advanced C ++ teaching experience and is more user-friendly to beginners in content organization. It is well-rounded and focused, so that readers can get started with useful programming more quickly, it is also suitable for self-study. 0.45 million people around the world have learned C ++ programming through various versions of the book.
For foreign technical books, it is often difficult to choose either a translation or a photocopy. This commentary version invites senior domestic experts to write and add Chinese comments and comments based on the original English version. It aims to combine the two topics to retain the original classic texts and tastes, with the learning and research experience and practical experience of the pioneers, the readers are given a shortcut to reading and learning.
The version commented on is worth reading and understanding. I hope this book will help you overcome the many obstacles of C ++, appreciate the magnificent scenery of high places, and become a successful and happy c ++ programmer.
Directory
C ++ primer (version 4th) (commentary Version)
Preface XXIV
Chapter 1 getting started (29 new comments)
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 I the basics
Chapter 2 variables and basic types (42 new comments)
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 new comments)
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 new comments)
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 new comments)
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 new comments)
6.1 simple statements
6.2 declarationstatements
6.3 compoundstatements (blocks)
6.4 statementscope
6.5 The ifstatement
6.5.1 The if statement elsebranch
6.6 The switchstatement
6.6.1 using a switch
6.6.2 control flow within a switch
6.6.3 the defaultlabel
6.6.4 switchexpressionandcaselabels
6.6.5 variable definitions inside a switch
6.7 The whilestatement
6.8 The forloopstatement
6.8.1 omitting parts of the forheader
6.8.2 multiple definitions in the forheader
6.9 The do whilestatement
6.10 The breakstatement
6.11 The continuestatement
6.12 The gotostatement
6.13 tryblocks andexceptionhandling
6.13.1 A throwexpression
6.13.2 the tryblock
6.13.3 standardexceptions
6.14 using the Preprocessor for debugging
Chapter 7 functions (56 new comments)
7.1 definingafunction
7.1.1 functionreturntype
7.1.2 functionparameterlist
7.2 argumentpassing
7.2.1 nonreferenceparameters
7.2.2 referenceparameters
7.2.3 vectorandothercontainerparameters
7.2.4 arrayparameters
7.2.5 managingarrayspassedtofunctions
7.2.6 main: handlingcommand-lineoptions
7.2.7 functionswithvaryingparameters
7.3 The returnstatement
7.3.1 functionswithnoreturnvalue
7.3.2 functions thatreturnavalue
7.3.3 Recursion
7.4 functiondeclarations
7.4.1 defaultarguments
7.5 localobjects
7.5.1 automaticobjects
7.5.2 staticlocalobjects
7.6 inline functions
7.7 classmemberfunctions
7.7.1 definingthebodyofamemberfunction
7.7.2 definingamemberfunctionoutside theclass
7.7.3 writing the sales_itemconstructor
7.7.4 organizing class code files
7.8 overloadedfunctions
7.8.1 overloadingandscope
7.8.2 functionmatchingandargumentconversions
7.8.3 thethreesteps inoverloadresolution
7.8.4 argument-typeconversions
7.9 pointers tofunctions
Chapter 8 the IO Library (11 new comments)
8.1 anobject-orientedlibrary
8.2 condition states
8.3 managingtheoutputbuffer
8.4 file input and output
8.4.1 using file stream objects
8.4.2 file Modes
8.4.3 a program to open and check input files
8.5 stringstreams
Part II containers and Algorithms
Chapter 9 sequential containers (54 new comments)
9.1 defininga sequentialcontainer
9.1.1 initializingcontainerelements
9.1.2 constraints ontypes that acontainercanhold
9.2 iterators anditeratorranges
9.2.1 iteratorranges
9.2.2 somecontaineroperations invalidateiterators
9.3 sequencecontaineroperations
9.3.1 containertypedefs
9.3.2 begin and endmembers
9.3.3 addingelements toasequentialcontainer
9.3.4 relationaloperators
9.3.5 container sizeoperations
9.3.6 accessingelements
9.3.7 erasingelements
9.3.8 assignment and swap
9.4 how a vectorgrows
9.4.1 capacity and reservemembers
9.5 decidingwhichcontainer touse
9.6 stringsrevisited
9.6.1 other ways to construct strings
9.6.2 other ways to change a string
9.6.3 string-onlyoperations
9.6.4 stringsearchoperations
9.6.5 comparing strings
9.7 containeradaptors
9.7.1 stackadaptor
9.7.2 queue andpriorityqueue
Chapter 10 Associative containers (22 new comments)
10.1 preliminaries: The pairtype
10.2 associativecontainers
10.3 The maptype
10.3.1 defining a map
10.3.2 types defined by map
10.3.3 adding elements to a map
10.3.4 subscripting a map
10.3.5 using map: insert
10.3.6 finding and retrieving a mapelement
10.3.7 erasing elements from a map
10.3.8 iterating implements ss a map
10.3.9 awordtransformationmap
10.4 The settype
10.4.1 defining and using sets
10.4.2 buildingaword-exclusionset
10.5 The multimap and multisettypes
10.5.1 addingandremovingelements
10.5.2 finding elements in a multimap or Multiset
10.6 usingcontainers: Text-queryprogram
10.6.1 designof thequeryprogram
10.6.2 textqueryclass
10.6.3 using the textqueryclass
10.6.4 writingthememberfunctions
Chapter 11 generic algorithms (18 new comments)
11.1 overview.
11.2 afirstlookat thealgorithms
11.2.1 read-onlyalgorithms
11.2.2 algorithms thatwritecontainerelements
11.2.3 algorithms thatreordercontainerelements
11.3 revisiting iterators
11.3.1 insert iterators
11.3.2 iostream iterators
11.3.3 reverse iterators
11.3.4 const iterators 7
11.3.5 thefive iteratorcategories
11.4 structureofgenericalgorithms
11.4.1 algorithmparameterpatterns
11.4.2 algorithmnamingconventions
11.5 container-specificalgorithms
Part III classes and Data Encryption action
Chapter 12 classes 429 (26 new comments)
12.1 classdefinitions anddeclarations
12.1.1 classdefinitions: arecap
12.1.2 dataworks actionandencapsulation
12.1.3 moreonclassdefinitions
12.1.4 classdeclarationsversusdefinitions
12.1.5 classobjects
12.2 The implicit thispointer
12.3 classscope
12.3.1 namelookupinclasss #
12.4 Constructors
12.4.1 theconstructor initializer
12.4.2 defaultarguments andconstructors
12.4.3 thedefaconconstructor
12.4.4 implicitclass-typeconversions
12.4.5 explicit initializationofclassmembers
12.5 friends
12.6 staticclassmembers
12.6.1 staticmemberfunctions
12.6.2 staticdatamembers
Chapter 13 copy control (30 new comments)
13.1 thecopyconstructor
13.1.1 the synthesizedcopyconstructor
13.1.2 definingourowncopyconstructor
13.1.3 preventingcopies
13.2 theassignmentoperator
13.3 thedestructor
13.4 amessage-handlingexample
13.5 managingpointermembers
13.5.1 definingsmartpointerclasses
13.5.2 defining valuelike classes
Chapter 14 overloaded operations and conversions (31 new comments)
14.1 defininganoverloadedoperator
14.1.1 overloadedoperatordesign
14.2 input andoutputoperators
14.2.1 overloading the output operator [
14.2.2 overloading the input operator]
14.3 arithmetic andrelationaloperators
14.3.1 equalityoperators
14.3.2 relationaloperators
14.4 assignmentoperators
14.5 subscriptoperator
14.6 memberaccessoperators
14.7 increment anddecrementoperators
14.8 calloperatorandfunctionobjects
14.8.1 usingfunctionobjectswithlibraryalgorithms
14.8.2 library-definedfunctionobjects
14.8.3 functionadaptors forfunctionobjects
14.9 conversions andclasstypes
14.9.1 whyconversionsareuseful
14.9.2 conversionoperators
14.9.3 argumentmatchingandconversions
14.9.4 overloadresolution andclassarguments
14.9.5 overloading, conversions, andoperators
Part IV object-oriented and generic programming
Chapter 15 object-oriented programming (56 new comments)
15.1 OOP: anoverview
15.2 definingbaseandderivedclasses
15.2.1 definingabaseclass
15.2.2 protectedmembers
15.2.3 derivedclasses
15.2.4 virtualandothermemberfunctions
15.2.5 public, private, andprotectedinheritance
15.2.6 friendshipandinheritance
15.2.7 inheritance andstaticmembers
15.3 conversions andinheritance
15.3.1 derived-to-baseconversions
15.3.2 conversions frombasetoderived
15.4 constructors andcopycontrol
15.4.1 base-classconstructors andcopycontrol
15.4.2 derived-classconstructors
15.4.3 copycontrol andinheritance
15.4.4 virtualdestructors
15.4.5 virtuals inconstructors anddestructors
15.5 classscopeunder inheritance
15.5.1 namelookuphappensatcompiletime
15.5.2 name collisions and inheritance
15.5.3 scopeandmemberfunctions
15.5.4 virtualfunctions andscope
15.6 purevirtualfunctions
15.7 containers andinheritance
15.8 handleclassesandinheritance
15.8.1 A pointerlike handle
15.8.2 cloninganunknowntype
15.8.3 usingthehandle
15.9 textqueriesrevisited
15.9.1 anobject-orientedsolution
15.9.2 A valuelike handle
15.9.3 the query_baseclass
15.9.4 the queryhandleclass
15.9.5 thederivedclasses
15.9.6 the evalfunctions
Chapter 16 templates and generic programming (31 new comments)
16.1 templatedefinitions
16.1.1 definingafunctiontemplate
16.1.2 definingaclasstemplate
16.1.3 templateparameters
16.1.4 templatetypeparameters
16.1.5 nontypetemplateparameters
16.1.6 writinggenericprograms
16.2 instantiation
16.2.1 templateargumentdeduction
16.2.2 function-templateexplicitarguments
16.3 templatecompilationmodels
16.4 classtemplatemembers
16.4.1 class-templatememberfunctions
16.4.2 templatearguments fornontypeparameters
16.4.3 frienddeclarations inclasstemplates
16.4.4 queue and queueitemfrienddeclarations
16.4.5 membertemplates
16.4.6 the complete queueclass
16.4.7 staticmembersofclasstemplates
16.5 agenerichandleclass
16.5.1 definingthehandleclass
16.5.2 usingthehandle
16.6 template specializations
16.6.1 specializingafunctiontemplate
16.6.2 specializingaclasstemplate
16.6.3 specializingmembersbutnot theclass
16.6.4 class-templatepartialspecializations
16.7 overloadingandfunctiontemplates
Part V advanced topics
Chapter 17 tools for large programs (37 new comments)
17.1 exceptionhandling
17.1.1 throwinganexceptionofclasstype
17.1.2 stackunwinding
17.1.3 catchinganexception
17.1.4 rethrow
17.1.5 thecatch-allhandler
17.1.6 functiontryblocks andconstructors
17.1.7 exceptionclasshierarchies
17.1.8 automaticresourcedeallocation
17.1.9 the auto_ptrclass
17.1.10exceptionspecifications
17.1.11functionpointerexceptionspecifications
17.2 namespaces
17.2.1 namespacedefinitions
17.2.2 nestednamespaces
17.2.3 unnamednamespaces
17.2.4 usingnamespacemembers
17.2.5 classes, namespaces, andscope
17.2.6 overloadingandnamespaces
17.2.7 namespacesandtemplates
17.3 multiple andvirtual inheritance
17.3.1 multiple inheritance
17.3.2 conversions andmultiplebaseclasses
17.3.3 copycontrol formultiplyderivedclasses
17.3.4 classscopeundermultiple inheritance
17.3.5 virtual inheritance
17.3.6 virtualbaseclassdeclaration
17.3.7 special initializationsemantics
Chapter 18 specialized tools and techniques (22 new comments)
18.1 optimizingmemoryallocation
18.1.1 memory allocation in C ++
18.1.2 the allocatorclass
18.1.3 operator new and operator deletefunctions
18.1.4 placement newexpressions
18.1.5 explicitdestructor Invocation
18.1.6 class specific new and delete
18.1.7 amemory-allocatorbaseclass
18.2 run-timetypeidentification
18.2.1 the dynamic_castoperator
18.2.2 the typeidoperator
18.2.3 usingrtti
18.2.4 the type_infoclass
18.3 pointer toclassmember
18.3.1 declaringapointer tomember
18.3.2 usingapointer toclassmember
18.4 nestedclasses
18.4.1 anested-class implementation
18.4.2 namelookupinnestedclasss #
18.5 Union: aspace-savingclass
18.6 localclasses
18.7 inherentlynonportablefeatures
18.7.1 bit-Fields
18.7.2 volatilequalifier
18.7.3 linkage directives: extern "C"
Appendix A the library
A.1 librarynames andheaders
A.2 abrieftourof thealgorithms
A.2.1 algorithms tofindanobject
A.2.2 otherread-onlyalgorithms
A.2.3 Binary-searchalgorithms
A.2.4 algorithms thatwritecontainerelements
A.2.5 partitioningandsortingalgorithms
A.2.6 generalreorderingoperations
A.2.7 permutationalgorithms
A.2.8 setalgorithms for sortedsequences
A.2.9 minimumandmaximumvalues
A.2.10 numericalgorithms
A.3 The iolibraryrevisited
A.3.1 formatstate
A.3.2 manymanipulatorschangetheformatstate.
A.3.3 controlling output formats
A.3.4 controlling input formatting
A.3.5 unformattedinput/outputoperations
A.3.6 single-byteoperations
A.3.7 multi-byteoperations
A.3.8 randomaccess toastream
A.3.9 reading andwriting to the same file

This book is from: China Interactive publishing network

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.