为你推荐
出版说明
教材出版委员会
Preface
前言
Chapter One Introduction 第1章 绪论
1.1 What is a computer program?(什么是计算机程序?)
1.2 Developing a computer program(开发计算机程序)
1.3 Learning C++(学习C++)
1.4 Web site for this book(本书的网站)
1.5 Brief history of C++(C++简史)
1.6 ANSI/ISO C++standard(ANSI/ISO C++标准)
Chapter Two Beginning to Program in C++第2章 C++编程入门
2.1 Constants(常量)
2.2 Variables(变量)
2.3 Simple output to the screen(简单的屏幕输出)
2.4 Comments(注释)
2.5 Data types(数据类型)
2.6 Data type sizes(数据类型的大小)
2.7 Operators(运算符)
2.8 Operator precedence(运算符的优先级)
2.9 Type conversions and casts(类型转换和强转)
Programming pitfalls
Quick syntax reference
Exercises
Chapter Three Keyboard Input and Screen Output 第3章 键盘输入和屏幕输出
3.1 Simple keyboard input(简单的键盘输入)
3.2 Manipulators(流操纵符)
3.3 Single-character input and output(单个字符的输入和输出)
Programming pitfalls
Quick syntax reference
Exercises
Chapter Four Selection and Iteration 第4章 选择与循环
4.1 Selection(选择)
4.2 Iteration(循环)
Programming pitfalls
Quick syntax reference
Exercises
Chapter Five Arrays and Structures 第5章 数组和结构体
5.1 Arrays(数组)
5.2 Structures(结构体)
5.3 The typedef statement(typedef语句)
5.4 Arrays of structures(结构体数组)
5.5 Enumerated data types(枚举数据类型)
Programming pitfalls
Quick syntax reference
Exercises
Chapter Six Strings 第6章 字符串
6.1 C-strings(C风格字符串)
6.2 C-string input and output(C风格字符串的输入和输出)
6.3 Accessing individual characters of a C-string(访问C风格字符串中的单个字符)
6.4 C-string functions(C风格字符串函数)
6.5 C++strings(C++字符串)
6.6 Arrays of strings(string类型的数组)
6.7 Character classification(字符分类)
Programming Pitfalls
Quick Syntax Reference
Exercises
Chapter Seven Functions 第7章 函数
7.1 Introduction(引言)
7.2 Function arguments(函数实参)
7.3 Default parameter values(默认的形参值)
7.4 Returning a value from a function(从函数返回一个值)
7.5 Inline functions(内联函数)
7.6 Passing arguments by value(按值传递实参)
7.7 Passing arguments by reference(按引用传递实参)
7.8 Passing a one-dimensional array to a function(向函数传递一维数组)
7.9 Passing a multi-dimensional array to a function(向函数传递多维数组)
7.10 Passing a structure variable to a function(向函数传递结构体变量)
7.11 Passing a string to function(向函数传递字符串)
7.12 Recursion(递归)
7.13 Function overloading(函数重载)
7.14 Storage classes auto and static(auto和static存储类型)
7.15 The scope of a variable(变量的作用域)
7.16 Mathematical functions(数学函数)
Programming Pitfalls
Quick Syntax Reference
Exercises
Chapter Eight Objects and Classes 第8章 对象和类
8.1 What is an object?(什么是对象?)
8.2 What is a class?(什么是类?)
8.3 Further examples of classes and objects(类和对象的更进一步的示例)
8.4 Abstraction(抽象)
8.5 Constructing a class in C++(在C++中构造一个类)
8.6 Using a class:defining and using objects(使用类:定义和使用对象)
8.7 Abstract data types(抽象数据类型)
8.8 Constructors(构造函数)
8.9 Default class constructor(默认的类构造函数)
8.10 Overloading class constructors(重载类构造函数)
8.11 Constructor initialisation lists(构造函数初始化列表)
8.12 Default argument values in a constructor(构造函数中的默认实参值)
8.13 static class data members(静态类数据成员)
8.14 Using return in a member function(在成员函数中使用return)
8.15 Inline class member functions(内联成员函数)
8.16 Class interface and class implementation(类的接口和类的实现)
Programming Pitfalls
Quick Syntax Reference
Exercises
Chapter Nine Pointers and Dynamic Memory 第9章 指针和动态内存分配
9.1 Variable addresses(变量的地址)
9.2 Pointer variables(指针变量)
9.3 The dereference operator*(解引用运算符*)
9.4 Using const with pointers(使用const修饰指针变量)
9.5 Pointers and one-dimensional arrays(指针和一维数组)
9.6 Pointers and multi-dimensional arrays(指针和多维数组)
9.7 Pointers to structures(指向结构体的指针)
9.8 Pointers to class objects(指向类对象的指针)
9.9 Pointers as function arguments(指针变量作为函数实参)
9.10 Dynamic memory allocation(动态内存分配)
Programming pitfalls
Quick syntax reference
Exercises
Chapter Ten Operator Overloading 第10章 运算符重载
10.1 The need for operator overloading(运算符重载的必要性)
10.2 Overloading the addition operator+(重载加法运算符+)
10.3 Rules of operator overloading(运算符重载的规则)
10.4 Overloading++(重载运算符++)
10.5 Overloading relational operators(重载关系运算符)
10.6 Overloading<<and>>(重载运算符<<和>>)
10.7 Conversion operators(转换运算符)
10.8 Use of friend functions(使用友元函数)
10.9 Overloading the assignment operator=(重载赋值运算符=)
10.10 The copy constructor(拷贝构造函数)
10.11 Overloading the index operator[](重载下标运算符[])
Programming pitfalls
Quick syntax reference
Exercises
Chapter Eleven Inheritance 第11章 继承
11.1 What is inheritance?(什么是继承?)
11.2 Inheritance syntax(继承语法)
11.3 Passing arguments to a base class constructor(向基类的构造函数传递实参)
11.4 Protected class members(受保护的类成员)
11.5 Types of inheritance:public,protected and private(继承的类型:public、protected和private)
11.6 Composition(组合)
11.7 Multiple inheritance(多重继承)
11.8 Virtual base classes(虚基类)
Programming pitfalls
Quick syntax reference
Exercises
Chapter Twelve Polymorphism 第12章 多态性
12.1 What is polymorphism?(什么是多态?)
12.2 Virtual functions(虚函数)
12.3 Abstract base classes(抽象基类)
Programming pitfalls
Quick syntax reference
Exercises
Chapter Thirteen Templates 第13章 模板
13.1 Introduction(引言)
13.2 Function templates(函数模板)
13.3 Class templates(类模板)
Programming pitfalls
Quick syntax reference
Exercises
Chapter Fourteen Files and Streams 第14章 文件和流
14.1 The C++input/output class hierarchy(C++输入/输出类层次结构)
14.2 Opening a file(打开文件)
14.3 File error checking(文件出错检查)
14.4 Single character I/O and detecting the end of a file(单字符的I/O和文件末尾的检测)
14.5 Appending data to the end of a file(向文件末尾添加数据)
14.6 Reading lines from a file(从文件中读取行)
14.7 Random access(随机存取)
14.8 Object I/O(对象I/O)
14.9 Binary I/O(二进制I/O)
Programming pitfalls
Quick syntax reference
Exercises
Appendix A List of C++Keywords
Appendix B Precedence and Associativity of C++Operators
Appendix C ASCII Character Codes
Appendix D Fundamental C++Built-in Data Types
Appendix E Common iomanip Manipulators
Appendix F Escape Sequences
Appendix G The C++Preprocessor
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜