首页

《C++ Primer_第五版》PDF英文版本下载

标签:C++,C语言,编程,Java     发布时间:2016-12-01   
  • 云盘下载:
  • [提取码:0000]
  • 本地下载:
       ( 需积分:2  )

一、目录介绍

C++ Primer 第五版 英文版副本.jpg

Preface xxiiiChapter 1 Getting Started1.1 Writing a Simple C++Program1.1.1 Compiling and Executing Our Program1.2 AFirstLookat Input/Output1.3 AWordaboutComments1.4 FlowofControl1.4.1 The whileStatement1.4.2 The forStatement1.4.3 ReadinganUnknownNumberof Inputs1.4.4 The ifStatement1.5 IntroducingClasses1.5.1 The Sales_itemClass1.5.2 AFirstLookatMemberFunctions1.6 TheBookstoreProgramChapterSummaryDefinedTermsPart I The BasicsChapter 2 Variables and Basic Types2.1 PrimitiveBuilt-inTypes2.1.1 ArithmeticTypes2.1.2 TypeConversions2.1.3 Literals2.2 Variables2.2.1 VariableDefinitions2.2.2 VariableDeclarations andDefinitions2.2.3 Identifiers2.2.4 Scopeof aName2.3 CompoundTypes2.3.1 References2.3.2 Pointersviiviii Contents2.3.3 UnderstandingCompoundTypeDeclarations2.4 constQualifier2.4.1 References to const2.4.2 Pointers and const2.4.3 Top-Level const2.4.4 constexprandConstantExpressions2.5 DealingwithTypes2.5.1 TypeAliases2.5.2 The autoTypeSpecifier2.5.3 The decltypeTypeSpecifier2.6 DefiningOurOwnDataStructures2.6.1 Defining the Sales_dataType2.6.2 Using the Sales_dataClass2.6.3 Writing Our Own Header FilesChapterSummaryDefinedTermsChapter 3 Strings, Vectors, and Arrays3.1 Namespace usingDeclarations3.2 Library stringType3.2.1 Defining and Initializing strings3.2.2 Operations on strings3.2.3 Dealing with the Characters in a string3.3 Library vectorType3.3.1 Defining and Initializing vectors3.3.2 Adding Elements to a vector3.3.3 Other vectorOperations3.4 IntroducingIterators3.4.1 UsingIterators3.4.2 IteratorArithmetic3.5 Arrays3.5.1 DefiningandInitializingBuilt-inArrays3.5.2 AccessingtheElementsof anArray3.5.3 Pointers andArrays3.5.4 C-StyleCharacterStrings3.5.5 InterfacingtoOlderCode3.6 MultidimensionalArraysChapterSummaryDefinedTermsChapter 4 Expressions4.1 Fundamentals4.1.1 BasicConcepts4.1.2 PrecedenceandAssociativity4.1.3 OrderofEvaluation4.2 ArithmeticOperators4.3 Logical andRelationalOperatorsContents ix4.4 AssignmentOperators4.5 Increment andDecrementOperators4.6 TheMemberAccessOperators4.7 TheConditionalOperator4.8 TheBitwiseOperators4.9 The sizeofOperator4.10 CommaOperator4.11 TypeConversions4.11.1 TheArithmeticConversions4.11.2 Other ImplicitConversions4.11.3 ExplicitConversions4.12 OperatorPrecedenceTableChapterSummaryDefinedTermsChapter 5 Statements5.1 Simple Statements5.2 StatementScope5.3 Conditional Statements5.3.1 The ifStatement5.3.2 The switchStatement5.4 IterativeStatements5.4.1 The whileStatement5.4.2 Traditional forStatement5.4.3 Range forStatement5.4.4 The do whileStatement5.5 JumpStatements5.5.1 The breakStatement5.5.2 The continueStatement5.5.3 The gotoStatement5.6 tryBlocks andExceptionHandling5.6.1 A throwExpression5.6.2 The tryBlock5.6.3 StandardExceptionsChapterSummaryDefinedTermsChapter 6 Functions6.1 FunctionBasics6.1.1 LocalObjects6.1.2 FunctionDeclarations6.1.3 SeparateCompilation6.2 ArgumentPassing6.2.1 PassingArgumentsbyValue6.2.2 PassingArgumentsbyReference6.2.3 constParametersandArguments6.2.4 ArrayParametersx Contents6.2.5 main:HandlingCommand-LineOptions6.2.6 FunctionswithVaryingParameters6.3 Return Types and the returnStatement6.3.1 FunctionswithNoReturnValue6.3.2 FunctionsThatReturnaValue6.3.3 ReturningaPointer toanArray6.4 OverloadedFunctions6.4.1 OverloadingandScope6.5 Features forSpecializedUses6.5.1 DefaultArguments6.5.2 Inline and constexprFunctions6.5.3 Aids for Debugging6.6 FunctionMatching6.6.1 ArgumentTypeConversions6.7 Pointers toFunctionsChapterSummaryDefinedTermsChapter 7 Classes7.1 DefiningAbstractDataTypes7.1.1 Designing the Sales_dataClass7.1.2 Defining the Revised Sales_dataClass7.1.3 DefiningNonmemberClass-RelatedFunctions7.1.4 Constructors7.1.5 Copy,Assignment, andDestruction7.2 AccessControl andEncapsulation7.2.1 Friends7.3 AdditionalClassFeatures7.3.1 ClassMembersRevisited7.3.2 Functions That Return *this7.3.3 ClassTypes7.3.4 FriendshipRevisited7.4 ClassScope7.4.1 NameLookupandClassScope7.5 ConstructorsRevisited7.5.1 Constructor InitializerList7.5.2 DelegatingConstructors7.5.3 TheRoleof theDefaultConstructor7.5.4 ImplicitClass-TypeConversions7.5.5 AggregateClasses7.5.6 LiteralClasses7.6 staticClassMembersChapterSummaryDefinedTermsContents xiPart II The C++ LibraryChapter 8 The IO Library8.1 The IOClasses8.1.1 NoCopyorAssignfor IOObjects8.1.2 ConditionStates8.1.3 ManagingtheOutputBuffer8.2 File Input and Output8.2.1 Using File Stream Objects8.2.2 File Modes8.3 stringStreams8.3.1 Using an istringstream8.3.2 Using ostringstreamsChapterSummaryDefinedTermsChapter 9 Sequential Containers9.1 Overviewof the SequentialContainers9.2 ContainerLibraryOverview9.2.1 Iterators9.2.2 ContainerTypeMembers9.2.3 begin and endMembers9.2.4 DefiningandInitializingaContainer9.2.5 Assignment and swap9.2.6 ContainerSizeOperations9.2.7 RelationalOperators9.3 SequentialContainerOperations9.3.1 AddingElements toaSequentialContainer9.3.2 AccessingElements9.3.3 ErasingElements9.3.4 Specialized forward_listOperations9.3.5 ResizingaContainer9.3.6 ContainerOperationsMayInvalidateIterators9.4 How a vectorGrows9.5 Additional stringOperations9.5.1 Other Ways to Construct strings9.5.2 Other Ways to Change a string9.5.3 stringSearchOperations9.5.4 The compareFunctions9.5.5 NumericConversions9.6 ContainerAdaptorsChapterSummaryDefinedTermsxii ContentsChapter 10 Generic Algorithms10.1 Overview10.2 AFirstLookat theAlgorithms10.2.1 Read-OnlyAlgorithms10.2.2 AlgorithmsThatWriteContainerElements10.2.3 AlgorithmsThatReorderContainerElements10.3 CustomizingOperations10.3.1 PassingaFunctiontoanAlgorithm10.3.2 LambdaExpressions10.3.3 LambdaCapturesandReturns10.3.4 BindingArguments10.4 Revisiting Iterators10.4.1 Insert Iterators10.4.2 iostream Iterators10.4.3 Reverse Iterators10.5 StructureofGenericAlgorithms10.5.1 TheFive IteratorCategories10.5.2 AlgorithmParameterPatterns10.5.3 AlgorithmNamingConventions10.6 Container-SpecificAlgorithmsChapterSummaryDefinedTermsChapter 11 Associative Containers11.1 UsinganAssociativeContainer11.2 Overviewof theAssociativeContainers11.2.1 DefininganAssociativeContainer11.2.2 Requirements onKeyType11.2.3 The pairType11.3 Operations onAssociativeContainers11.3.1 AssociativeContainer Iterators11.3.2 AddingElements11.3.3 ErasingElements11.3.4 Subscripting a map11.3.5 AccessingElements11.3.6 AWordTransformationMap11.4 TheUnorderedContainersChapterSummaryDefinedTermsChapter 12 DynamicMemory12.1 DynamicMemoryandSmartPointers12.1.1 The shared_ptrClass12.1.2 ManagingMemoryDirectly12.1.3 Using shared_ptrs with new12.1.4 SmartPointers andExceptions12.1.5 unique_ptrContents xiii12.1.6 weak_ptr12.2 DynamicArrays12.2.1 newandArrays12.2.2 The allocatorClass12.3 UsingtheLibrary:AText-QueryProgram12.3.1 Designof theQueryProgram12.3.2 DefiningtheQueryProgramClassesChapterSummaryDefinedTermsPart III Tools for Class AuthorsChapter 13 Copy Control13.1 Copy,Assign, andDestroy13.1.1 TheCopyConstructor13.1.2 TheCopy-AssignmentOperator13.1.3 TheDestructor13.1.4 TheRuleofThree/Five13.1.5 Using = default13.1.6 PreventingCopies13.2 CopyControl andResourceManagement13.2.1 ClassesThatActLikeValues13.2.2 DefiningClassesThatActLikePointers13.3 Swap13.4 ACopy-ControlExample13.5 ClassesThatManageDynamicMemory13.6 MovingObjects13.6.1 RvalueReferences13.6.2 MoveConstructor andMoveAssignment13.6.3 RvalueReferencesandMemberFunctionsChapterSummaryDefinedTermsChapter 14 Overloaded Operations and Conversions14.1 BasicConcepts14.2 Input andOutputOperators14.2.1 Overloading the Output Operator <<14.2.2 Overloading the Input Operator >>14.3 Arithmetic andRelationalOperators14.3.1 EqualityOperators14.3.2 RelationalOperators14.4 AssignmentOperators14.5 SubscriptOperator14.6 Increment andDecrementOperators14.7 MemberAccessOperators14.8 Function-CallOperatorxiv Contents14.8.1 LambdasAreFunctionObjects14.8.2 Library-DefinedFunctionObjects14.8.3 Callable Objects and function14.9 Overloading,Conversions, andOperators14.9.1 ConversionOperators14.9.2 AvoidingAmbiguousConversions14.9.3 FunctionMatchingandOverloadedOperatorsChapterSummaryDefinedTermsChapter 15 Object-Oriented Programming15.1 OOP:AnOverview15.2 DefiningBaseandDerivedClasses15.2.1 DefiningaBaseClass15.2.2 DefiningaDerivedClass15.2.3 Conversions andInheritance15.3 VirtualFunctions15.4 AbstractBaseClasses15.5 AccessControl andInheritance15.6 ClassScopeunder Inheritance15.7 Constructors andCopyControl15.7.1 VirtualDestructors15.7.2 SynthesizedCopyControl andInheritance15.7.3 Derived-ClassCopy-ControlMembers15.7.4 InheritedConstructors15.8 Containers andInheritance15.8.1 Writing a BasketClass15.9 TextQueriesRevisited15.9.1 AnObject-OrientedSolution15.9.2 The Query_base and QueryClasses15.9.3 TheDerivedClasses15.9.4 The evalFunctionsChapterSummaryDefinedTermsChapter 16 Templates and Generic Programming16.1 DefiningaTemplate16.1.1 FunctionTemplates16.1.2 ClassTemplates16.1.3 TemplateParameters16.1.4 MemberTemplates16.1.5 Controlling Instantiations16.1.6 Efficiency and Flexibility16.2 TemplateArgumentDeduction16.2.1 Conversions andTemplateTypeParameters16.2.2 Function-TemplateExplicitArguments16.2.3 Trailing Return Types and Type TransformationContents xv16.2.4 FunctionPointers andArgumentDeduction16.2.5 TemplateArgumentDeductionandReferences16.2.6 Understanding std::move16.2.7 Forwarding16.3 OverloadingandTemplates16.4 VariadicTemplates16.4.1 WritingaVariadicFunctionTemplate16.4.2 PackExpansion16.4.3 ForwardingParameterPacks16.5 Template SpecializationsChapterSummaryDefinedTermsPart IV Advanced TopicsChapter 17 Specialized Library Facilities17.1 The tupleType17.1.1 Defining and Initializing tuples17.1.2 Using a tuple toReturnMultipleValues17.2 The bitsetType17.2.1 Defining and Initializing bitsets17.2.2 Operations on bitsets17.3 RegularExpressions17.3.1 UsingtheRegularExpressionLibrary17.3.2 TheMatchandRegex IteratorTypes17.3.3 UsingSubexpressions17.3.4 Using regex_replace17.4 RandomNumbers17.4.1 Random-NumberEngines andDistribution17.4.2 OtherKinds ofDistributions17.5 The IOLibraryRevisited17.5.1 FormattedInput andOutput17.5.2 UnformattedInput/OutputOperations17.5.3 RandomAccess toaStreamChapterSummaryDefinedTermsChapter 18 Tools for Large Programs18.1 ExceptionHandling18.1.1 ThrowinganException18.1.2 CatchinganException18.1.3 Function tryBlocks andConstructors18.1.4 The noexceptExceptionSpecification18.1.5 ExceptionClassHierarchies18.2 Namespaces18.2.1 NamespaceDefinitionsxvi Contents18.2.2 UsingNamespaceMembers18.2.3 Classes,Namespaces,andScope18.2.4 OverloadingandNamespaces18.3 Multiple andVirtual Inheritance18.3.1 Multiple Inheritance18.3.2 Conversions andMultipleBaseClasses18.3.3 ClassScopeunderMultiple Inheritance18.3.4 Virtual Inheritance18.3.5 Constructors andVirtual InheritanceChapterSummaryDefinedTermsChapter 19 Specialized Tools and Techniques19.1 Controlling Memory Allocation19.1.1 Overloading new and delete19.1.2 Placement newExpressions19.2 Run-TimeTypeIdentification19.2.1 The dynamic_castOperator19.2.2 The typeidOperator19.2.3 UsingRTTI19.2.4 The type_infoClass19.3 Enumerations19.4 Pointer toClassMember19.4.1 Pointers toDataMembers19.4.2 Pointers toMemberFunctions19.4.3 UsingMemberFunctions asCallableObjects19.5 NestedClasses19.6 union:ASpace-SavingClass19.7 LocalClasses19.8 InherentlyNonportableFeatures19.8.1 Bit-fields19.8.2 volatileQualifier19.8.3 Linkage Directives: extern “C”ChapterSummaryDefinedTermsAppendix A The LibraryA.1 LibraryNames andHeadersA.2 ABriefTourof theAlgorithmsA.2.1 Algorithms toFindanObjectA.2.2 OtherRead-OnlyAlgorithmsA.2.3 BinarySearchAlgorithmsA.2.4 AlgorithmsThatWriteContainerElementsA.2.5 PartitioningandSortingAlgorithmsA.2.6 GeneralReorderingOperationsA.2.7 PermutationAlgorithmsA.2.8 SetAlgorithms forSortedSequencesContents xviiA.2.9 MinimumandMaximumValuesA.2.10 NumericAlgorithmsA.3 RandomNumbersA.3.1 RandomNumberDistributionsA.3.2 RandomNumberEnginesIndexNew Features in C++2.1.1 long longType2.2.1 List Initialization2.3.2 nullptrLiteral2.4.4 constexprVariables2.5.1 TypeAliasDeclarations2.5.2 The autoTypeSpecifier2.5.3 The decltypeTypeSpecifier2.6.1 In-Class Initializers3.2.2 Using auto or decltype forTypeAbbreviation3.2.3 Range forStatement3.3 Defining a vector of vectors3.3.1 List Initialization for vectors3.4.1 Container cbegin and cendFunctions3.5.3 Library begin and endFunctions3.6 Using auto or decltype to SimplifyDeclarations4.2 RoundingRules forDivision4.4 Assignment fromaBracedListofValues4.9 sizeofAppliedtoaClassMember5.4.3 Range forStatement6.2.6 Library initializer_listClass6.3.2 List InitializingaReturnValue6.3.3 Declaring a Trailing Return Type6.3.3 Using decltype to Simplify Return Type Declarations6.5.2 constexprFunctions7.1.4 Using = default toGenerateaDefaultConstructor7.3.1 In-class Initializers forMembersofClassType7.5.2 DelegatingConstructors7.5.6 constexprConstructors8.2.1 Using strings for File Names9.1 The array and forward_listContainers9.2.3 Container cbegin and cendFunctions9.2.4 List InitializationforContainers9.2.5 Container Nonmember swapFunctions9.3.1 Return Type for Container insertMembers9.3.1 Container emplaceMembersxixxx New Features in C++9.4 shrink_to_fit9.5.5 Numeric Conversion Functions for strings10.3.2 LambdaExpressions10.3.3 Trailing Return Type in Lambda Expressions10.3.4 The Library bindFunction11.2.1 List Initializationof anAssociativeContainer11.2.3 List Initializing pairReturnType11.3.2 List Initialization of a pair11.4 TheUnorderedContainers12.1 SmartPointers12.1.1 The shared_ptrClass12.1.2 List InitializationofDynamicallyAllocatedObjects12.1.2 autoandDynamicAllocation12.1.5 The unique_ptrClass12.1.6 The weak_ptrClass12.2.1 Range for Doesn‘t Apply to Dynamically AllocatedArrays12.2.1 List InitializationofDynamicallyAllocatedArrays12.2.1 autoCan’tBeUsedtoAllocateanArray12.2.2 allocator::constructCanUseanyConstructor13.1.5 Using = default forCopy-ControlMembers13.1.6 Using = delete toPreventCopyingClassObjects13.5 MovingInsteadofCopyingClassObjects13.6.1 RvalueReferences13.6.1 The Library moveFunction13.6.2 MoveConstructor andMoveAssignment13.6.2 Move Constructors Usually Should Be noexcept13.6.2 MoveIterators13.6.3 ReferenceQualifiedMemberFunctions14.8.3 The functionClassTemplate14.9.1 explicitConversionOperators15.2.2 overrideSpecifier forVirtualFunctions15.2.2 Preventing Inheritance by Defining a Class as final15.3 override and final Specifiers for Virtual Functions15.7.2 DeletedCopyControl andInheritance15.7.4 InheritedConstructors16.1.2 DeclaringaTemplateTypeParameteras aFriend16.1.2 TemplateTypeAliases16.1.3 DefaultTemplateArguments forTemplateFunctions16.1.5 ExplicitControlof Instantiation16.2.3 Template Functions and Trailing Return Types16.2.5 ReferenceCollapsingRules16.2.6 static_cast fromanLvaluetoanRvalue16.2.7 The Library forwardFunction16.4 VariadicTemplates16.4 The sizeof…Operator16.4.3 VariadicTemplates andForwardingNew Features in C++11 xxi17.1 The Library TupleClassTemplate17.2.2 New bitsetOperations17.3 TheRegularExpressionLibrary17.4 TheRandomNumberLibrary17.5.1 Floating-Point FormatControl18.1.4 The noexceptExceptionSpecifier18.1.4 The noexceptOperator18.2.1 InlineNamespaces18.3.1 InheritedConstructors andMultiple Inheritance19.3 Scoped enums19.3 Specifying the Type Used to Hold an enum19.3 Forward Declarations for enums19.4.3 The Library mem_fnClassTemplate19.6 UnionMembersofClassTypes


��