图书介绍

双语版C++程序设计2025|PDF|Epub|mobi|kindle电子书版本百度云盘下载

双语版C++程序设计
  • (爱尔兰)凯利,苏小红著 著
  • 出版社: 北京:电子工业出版社
  • ISBN:9787121107979
  • 出版时间:2010
  • 标注页数:388页
  • 文件大小:13MB
  • 文件页数:405页
  • 主题词:C语言-程序设计-高等学校-教材-汉、英

PDF下载


点此进入-本书在线PDF格式电子书下载【推荐-云解压-方便快捷】直接下载PDF格式图书。移动端-PC端通用
种子下载[BT下载速度快]温馨提示:(请使用BT下载软件FDM进行下载)软件下载地址页直链下载[便捷但速度慢]  [在线试读本书]   [在线获取解压码]

下载说明

双语版C++程序设计PDF格式电子书版下载

下载的文件为RAR压缩包。需要使用解压软件进行解压得到PDF格式图书。

建议使用BT下载工具Free Download Manager进行下载,简称FDM(免费,没有广告,支持多平台)。本站资源全部打包为BT种子。所以需要使用专业的BT下载软件进行下载。如BitComet qBittorrent uTorrent等BT下载工具。迅雷目前由于本站不是热门资源。不推荐使用!后期资源热门了。安装了迅雷也可以迅雷进行下载!

(文件页数 要大于 标注页数,上中下等多册电子书除外)

注意:本站所有压缩包均有解压码: 点击下载压缩包解压工具

图书目录

Chapter One Introduction(绪论)1

1.1 What is a computer program?(什么是计算机程序?)1

1.2 Developing a computer program(开发计算机程序)2

1.2.1 Program development cycle2

1.3 Learning C++(学习C++)4

1.4 Web site for this book(本书的网站)5

1.5 Brief history of C++(C++简史)5

1.6 ANSI/ISO C++ standard(ANSI/ISO C++标准)5

Chapter Two Beginning to Program in C++(C++编程入门)6

2.1 Constants(常量)6

2.2 Variables(变量)6

2.3 Simple output to the screen(简单的屏幕输出)7

2.4 Comments(注释)9

2.5 Data types(数据类型)11

2.5.1 Short Integer data types11

2.5.2 Long Integer data types11

2.5.3 Boolean data types11

2.5.4 Double Floating-point data types11

2.6 Data type sizes(数据类型的大小)12

2.7 Operators(运算符)12

2.7.1 The assignment operator12

2.7.2 Arithmetic operators13

2.7.3 Increment and decrement operators14

2.7.4 Combined assignment operators17

2.8 Operator precedence(运算符的优先级)17

2.9 Type conversions and casts(类型转换和强转)19

Programming pitfalls22

Quick syntax reference24

Exercises25

Chapter Three Keyboard Input and Screen Output(键盘输入和屏幕输出)29

3.1 Simple keyboard input(简单的键盘输入)29

3.2 Manipulators(流操纵符)31

3.3 Single-character input and output(单个字符的输入和输出)34

Programming pitfalls36

Quick syntax reference36

Exercises37

Chapter Four Selection and Iteration(选择与循环)38

4.1 Selection(选择)38

4.1.1 The if statement38

4.1.2 The if-else statement39

4.1.3 Compound statements40

4.1.4 Logical operators41

4.1.5 Nested if statements42

4.1.6 The switch statement42

4.1.7 The conditional operator?:44

4.2 Iteration(循环)45

4.2.1 The while statement45

4.2.2 The do-while loop47

4.2.3 The for statement48

4.2.4 Nested loops50

Programming pitfalls53

Quick syntax reference55

Exercises57

Chapter Five Arrays and Structures(数组和结构体)60

5.1 Arrays(数组)60

5.1.1 Introduction60

5.1.2 Initialising an array64

5.1.3 Two-dimensional arrays65

5.1.4 Initialising a two-dimensional array67

5.1.5 Multi-dimensional arrays68

5.2 Structures(结构体)69

5.2.1 Introduction69

5.2.2 Declaring a structure69

5.2.3 Initialising a structure variable72

5.2.4 Nested structures73

5.3 The typedef statement(typedef语句)74

5.4 Arrays of structures(结构体数组)75

5.5 Enumerated data types(枚举数据类型)75

Programming pitfalls77

Quick syntax reference78

Exercises78

Chapter Six Strings(字符串)82

6.1 C-strings(C风格字符串)82

6.2 C-string input and output(C风格字符串的输入和输出)83

6.3 Accessing individual characters of a C-string(访问C风格字符串中的单个字符)88

6.4 C-string functions(C风格字符串函数)88

6.4.1 Finding the length of a C-string89

6.4.2 Copying a C-string89

6.4.3 C-string concatenation90

6.4.4 Comparing C-strings90

6.4.5 Other C-string functions91

6.4.6 Converting numeric C-strings to numbers91

6.5 C++ strings(C++字符串)92

6.5.1 string initialisation and assignment94

6.5.2 string concatenation96

6.5.3 string length,string indexing and sub-strings97

6.5.4 string replace,erase,insert and empty strings99

6.5.5 string searching100

6.5.6 string comparisons102

6.5.7 string input104

6.5.8 string conversions105

6.6 Arrays of strings(string类型的数组)107

6.7 Character classification(字符分类)107

Programming Pitfalls110

Quick Syntax Reference111

Exercises111

Chapter Seven Functions(函数)114

7.1 Introduction(引言)114

7.2 Function arguments(函数实参)116

7.3 Default parameter values(默认的形参值)120

7.4 Returning a value from a function(从函数返回一个值)120

7.5 Inline functions(内联函数)122

7.6 Passing arguments by value(按值传递实参)123

7.7 Passing arguments by reference(按引用传递实参)124

7.8 Passing a one-dimensional array to a function(向函数传递一维数组)127

7.9 Passing a multi-dimensional array to a function(向函数传递多维数组)132

7.10 Passing a structure variable to a function(向函数传递结构体变量)133

7.11 Passing a string to function(向函数传递字符串)136

7.11.1 Passing a C++ string to a function136

7.11.2 Passing a C-string to a function137

7.12 Recursion(递归)137

7.13 Function overloading(函数重载)140

7.14 Storage classes auto and static(auto和static存储类型)142

7.14.1 auto142

7.14.2 static142

7.15 The scope of a variable(变量的作用域)144

7.15.1 Block scope144

7.15.2 Global scope145

7.15.3 Reusing a variable name146

7.16 Mathematical functions(数学函数)148

7.16.1 Some trigonometric functions148

7.16.2 Pseudo-random number functions149

Programming Pitfalls151

Quick Syntax Reference151

Exercises152

Chapter Eight Objects and Classes(对象和类)157

8.1 What is an object?(什么是对象?)157

8.2 What is a class?(什么是类?)157

8.3 Further examples of classes and objects(类和对象的更进一步的示例)160

8.3.1 A student class160

8.3.2 A bank account class161

8.4 Abstraction(抽象)162

8.5 Constructing a class in C++(在C++中构造一个类)162

8.6 Using a class:defining and using objects(使用类:定义和使用对象)165

8.7 Abstract data types(抽象数据类型)166

8.8 Constructors(构造函数)167

8.9 Default class constructor(默认的类构造函数)169

8.10 Overloading class constructors(重载类构造函数)172

8.11 Constructor initialisation lists(构造函数初始化列表)174

8.12 Default argument values in a constructor(构造函数中的默认实参值)174

8.13 static class data members(静态类数据成员)176

8.14 Using return in a member function(在成员函数中使用return)180

8.15 Inline class member functions(内联成员函数)182

8.16 Class interface and class implementation(类的接口和类的实现)183

8.16.1 Separation of class interface and class implementation185

8.16.2 Use of namespaces in header files187

Programming Pitfalls191

Quick Syntax Reference191

Exercises192

Chapter Nine Pointers and Dynamic Memory(指针和动态内存分配)196

9.1 Variable addresses(变量的地址)196

9.2 Pointer variables(指针变量)197

9.3 The dereference operator*(解引用运算符*)198

9.4 Using const with pointers(使用const修饰指针变量)199

9.5 Pointers and one-dimensional arrays(指针和一维数组)201

9.6 Pointers and multi-dimensional arrays(指针和多维数组)203

9.7 Pointers to structures(指向结构体的指针)204

9.8 Pointers to class objects(指向类对象的指针)206

9.9 Pointers as function arguments(指针变量作为函数实参)207

9.10 Dynamic memory allocation(动态内存分配)209

9.10.1 Allocating memory dynamically for an array210

9.10.2 Initialisation with new211

9.10.3 Allocating memory for multi-dimensional arrays213

9.10.4 Out of memory error215

Programming pitfalls217

Quick syntax reference218

Exercises219

Chapter Ten Operator Overloading(运算符重载)222

10.1 The need for operator overloading(运算符重载的必要性)222

10.2 Overloading the addition operator+(重载加法运算符+)223

10.3 Rules of operator overloading(运算符重载的规则)230

10.4 Overloading ++(重载运算符++)231

10.4.1 Overloading prefix and postfix forms of ++233

10.4.2 Improving the prefix ++ operator member function237

10.5 Overloading relational operators(重载关系运算符)237

10.6 Overloading<<and>>(重载运算符<<和>>)241

10.7 Conversion operators(转换运算符)246

10.8 Use of friend functions(使用友元函数)250

10.9 Overloading the assignment operator=(重载赋值运算符=)251

10.9.1 A class with a pointer data member251

10.9.2 Assigning one object to another254

10.10 The copy constructor(拷贝构造函数)263

10.11 Overloading the index operator[](重载下标运算符[])268

Programming pitfalls272

Quick syntax reference273

Exercises273

Chapter Eleven Inheritance(继承)276

11.1 What is inheritance?(什么是继承?)276

11.2 Inheritance syntax(继承语法)278

11.3 Passing arguments to a base class constructor(向基类的构造函数传递实参)286

11.4 Protected class members(受保护的类成员)291

11.5 Types of inheritance:public,protected andprivate(继承的类型:public、protected和private)295

11.6 Composition(组合)296

11.7 Multiple inheritance(多重继承)298

11.8 Virtual base classes(虚基类)302

Programming pitfalls305

Quick syntax reference306

Exercises306

Chapter Twelve Polymorphism(多态性)312

12.1 What is polymorphism?(什么是多态?)312

12.2 Virtual functions(虚函数)316

12.2.1 When to use virtual functions322

12.2.2 Overriding and overloading322

12.3 Abstract base classes(抽象基类)322

Programming pitfalls327

Quick syntax reference328

Exercises328

Chapter Thirteen Templates(模板)332

13.1 Introduction(引言)332

13.2 Function templates(函数模板)332

13.3 Class templates(类模板)337

Programming pitfalls343

Quick syntax reference343

Exercises344

Chapter Fourteen Files and Streams(文件和流)346

14.1 The C++ input/output class hierarchy(C++输入/输出类层次结构)346

14.2 Opening a file(打开文件)347

14.3 File error checking(文件出错检查)349

14.4 Single character I/O and detecting the end of a file(单字符的I/O和文件末尾的检测)351

14.5 Appending data to the end of a file(向文件末尾添加数据)355

14.6 Reading lines from a file(从文件中读取行)356

14.7 Random access(随机存取)357

14.8 Object I/O(对象I/O)361

14.9 Binary I/O(二进制I/O)362

14.9.1 Serial writing of objects to a binary file363

14.9.2 Serial reading of objects from a binary file367

14.9.3 Binary I/O as class member functions368

14.9.4 Binary file random access369

Programming pitfalls374

Quick syntax reference374

Exercises376

Appendix A List of C++ Keywords378

Appendix B Precedence and Associativity of C++ Operators379

Appendix C ASCII Character Codes381

Appendix D Fundamental C++ Built-in Data Types383

Appendix E Common iomanip Manipulators384

Appendix F Escape Sequences385

Appendix G The C++ Preprocessor386

热门推荐