Essential C++ /

副标题:无

作   者:Stanley B. Lippman著.

分类号:

ISBN:9787115152572

微信扫一扫,移动浏览光盘

简介

本书是众多C++初学者的入门经典。全书从4个方面来表现C++的本质:procedural(过程化的)、generic(泛型的)、object-based(基于对象的)、object-oriented(面向对象的)。本书的组织围绕着一系列由浅入深的程序问题,以及用以解决这些问题的语言特性。按照这种方式,读者不但会学到C++的函数和结构,还会学习到它们的设计目的和基本原理。   本书涉猎范围很广,内容涉及C++语言发展的主要几个方面,适合有一定基础的C++初学者。

目录

chapter 1: basic c++ programming 1

1.1: how to write a c++ program. 1

1.2: defining and initializing a data object 7

1.3: writing expressions 10

1.4: writing conditional and loop statements 15

1.5: how to use arrays and vectors 22

1.6 pointers allow for flexibility 26

1.7: writing and reading files 30

chapter 2: procedural programming 35

2.1: how to write a function 35

2.2: invoking a function 41

2.3: providing default parameter values 50

2.4: using local static objects 53

2.5: declaring a function inline 55

2.6: providing overloaded functions 56

2.7: defining and using template functions 58

2.8: pointers to functions add flexiblity 60

2.9: setting up a header file 63

chapter 3: generic programming 67

3.1: the arithmetic of pointers 68

.3.2: making sense of iterators 73

3.3: operations common to all containers 76

3.4: using the sequential containers 77

3.5: using the generic algorithms 81

3.6: how to design a generic algorithm 83

3.7: using a map 90

3.8: using a set 91

3.9: how to use iterator inserters 93

3.10: using the iostream iterators 95

chapter 4: object-based programming 99

4.1: how to implement a class 100

4.2: what are class constructors and the class destructor? 104

4.3: what are mutable and const? 109

4.4: what is the this pointer?.. 113

4.5: static class members 115

4.6: building an iterator class 118

4.7: collaboration sometimes requires friendship 123

4.8: implementing a copy assignment operator 125

4.9: implementing a function object 126

4.10: providing class instances of the iostream operators 128

4.11: pointers to class member functions 130

chapter 5: object-oriented programming 135

5.1: object-oriented programming concepts 135

5.2: a tour of object-oriented programming 138

5.3: polymorphism without inheritance 142

5.3: defining an abstract base class 145

5.4: defining a derived class 148

5.5: using an inheritance hierarchy 155

5.6: how abstract should a base class be? 157

5.7: initialization, destruction, and copy 158

5.8: defining a derived class virtual function 160

5.9: run-time type identification 164

chapter 6: programming with templates 167

6.1: parameterized types 169

6.2: the template class definition 171

6.3: handling template type parameters 172

6.4: implementing the template class 174

6.5: a function template output operator 180

6.6: constant expressions and default parameters 181

6.7: template parameters as strategy 185

6.8: member template functions 187

chapter 7: exception handling 191

7.1: throwing an exception 191

7.2: catching an exception 193

7.3: trying for an exception 194

7.4: local resource management 198

7.5: the standard exceptions 200

appendix a: exercise solutions 205

appendix b: generic algorithms handbook 255

index... 271


已确认勘误

次印刷

页码 勘误内容 提交人 修订印次

Essential C++ /
    • 名称
    • 类型
    • 大小

    光盘服务联系方式: 020-38250260    客服QQ:4006604884

    意见反馈

    14:15

    关闭

    云图客服:

    尊敬的用户,您好!您有任何提议或者建议都可以在此提出来,我们会谦虚地接受任何意见。

    或者您是想咨询:

    用户发送的提问,这种方式就需要有位在线客服来回答用户的问题,这种 就属于对话式的,问题是这种提问是否需要用户登录才能提问

    Video Player
    ×
    Audio Player
    ×
    pdf Player
    ×
    Current View

    看过该图书的还喜欢

    some pictures

    解忧杂货店

    东野圭吾 (作者), 李盈春 (译者)

    loading icon