C++ for C Programmers, 3/e
暫譯: C++ 程式設計師的 C++,第 3 版
Ira Pohl
- 出版商: Addison Wesley
- 出版日期: 1998-11-20
- 售價: $833
- 語言: 英文
- 頁數: 504
- 裝訂: Paperback
- ISBN: 0201395193
- ISBN-13: 9780201395198
-
相關分類:
C 程式語言、C++ 程式語言
已絕版
買這商品的人也買了...
-
$1,200$1,176 -
$580$458 -
$1,068Software Engineering, 6/e
-
$350$298 -
$970Introduction to Algorithms, 2/e
-
$650$585 -
$900$711 -
$1,730$1,644 -
$1,029Operating System Concepts, 6/e (Windows XP Update)
-
$1,090$1,068 -
$1,030$1,009 -
$2,370$2,252 -
$1,880$1,786 -
$1,650$1,568 -
$780$741 -
$1,127Computer Networks, 4/e
-
$650$553 -
$590$466 -
$720$684 -
$600$474 -
$149$149 -
$490$382 -
$880$695 -
$590$460 -
$650$507
相關主題
商品描述
Description
Extensively revised and updated, this proven book by noted C++/C expert Ira Pohl is written specifically for C programmers who are transitioning to C++. The book takes an evolutionary teaching approach, using C as a starting point and C++ as a destination. This third edition reflects the new ANSI C++ Standard, and covers the latest language features — including detailed discussions of templates, STL, and exception handling.
Appropriate Courses
C++--Intermediate Programming, Programming Languages/Comparative Languages.
Table Of Contents
(Each chapter concludes with a Summary, Review Questions and Exercises.)
Preface.
1. An Overview of C++ and Object-Oriented Programming.
Why Learn C++?
C as a Starting Point.
Classes and Abstract Data Types.
Constructors and Destructors.
Overloading.
Inheritance.
Moving from C++ to Java.
Benefits of Object-Oriented Programming.
Pragmatics.
2. Native Types and Statements.
Keywords.
Identifiers.
Literals.
Operators and Punctuators.
Input/Output.
Program Structure.
Simple Types.
The Traditional Conversions.
Enumeration Types.
Expressions.
Statements.
The Compound Statement.
The if and if-else Statements.
The while Statement.
The for Statement.
The do Statement.
The break and continue Statements.
The switch Statement.
Pragmatics.
Moving from C++ to Java.
3. Functions, Pointers, and Arrays.
Function Definition.
The return Statement.
Function Prototypes.
Default Arguments.
Functions as Arguments.
Overloading Functions.
Inlining.
Scope and Storage Class.
The Storage Class extern.
The Storage Class register.
The Storage Class static.
Linkage Mysteries.
Namespaces.
Pointer Types.
Pointer-Based Call-by-Reference.
Reference Declarations and Call-by-Reference.
The Uses of void.
Arrays and Pointers.
Initialization.
The Relationship Between Arrays and Pointers.
Passing Arrays to Functions.
The char String: A Kernel Language ADT.
Multidimensional Arrays.
Assertions and Program Correctness.
Free-Store Operators new and delete.
Pragmatics.
String Instead of char.
Moving from C++ to Java.
4. Classes.
Structure Pointer Operator.
Member Functions.
Access: Private and Public.
Classes.
Class Scope.
Nested Classes.
An Example: Flushing.
static and const Members.
The this Pointer.
Unions.
Bit Fields.
A Container Class Example: ch_stack.
Pragmatics.
Moving from C++ to Java.
5. Constructors and Destructors.
Constructor Initializer.
Constructors as Conversions.
Improving the
point
Class. Constructing a Dynamically Sized Stack.
Classes with Destructors.
An Example: Dynamically Allocated Strings.
The Class dbl_vect.
Members That Are Class Types.
Example: A Singly Linked List.
Two-Dimensional Arrays.
Polynomials as a Linked List.
Strings Using Reference Semantics.
No Constructor, Copy Constructor, and Other Mysteries.
Pragmatics.
Moving from C++ to Java.
6. Operator Overloading and Conversions.
Overloading and Function Selection.
Friend Functions.
Overloading Operators.
Unary Operator Overloading.
Binary Operator Overloading.
Overloading Assignment and Subscripting Operators.
Polynomial: Type and Language Expectations.
Overloading I/O Operators << and >>.
Overloading Operator () for Indexing.
Overloading the Pointer Operator ->.
Overloading new and delete.
Pragmatics.
Moving from C++ to Java.
7. Templates, Generic Programming, and STL.
Function Templates.
Class Templates.
Static Members.
Class Template Arguments.
Default Template Arguments.
Member Templates.
Parameterizing the Class vector.
STL.
Containers.
Associative Containers.
Container Adapters.
Iterators.
Iterator Adapters.
Algorithms.
Nonmutating Sequence Algorithms.
Mutating Sequence Algorithms.
Numerical Algorithms.
Numerical Integration Made Easy.
Pragmatics.
Moving from C++ to Java.
8. Inheritance.
Typing Conversions and Visibility.
Virtual Functions.
Abstract Base Classes.
Templates and Inheritance.
Multiple Inheritance.
Inheritance and Design.
Code Reuse.
Runtime Type Identification.
Pragmatics.
Moving from C++ to Java.
9. Exceptions.
C++ Exceptions.
Throwing Exceptions.
Exception Expressions.
Try Blocks.
Handlers.
Exception Specification.
Terminate() and Unexpected().
Example Exception Code.
Standard Exceptions and Their Uses.
Pragmatics.
Moving from C++ to Java.
10. OOP Using C++.
Reuse and Inheritance.
Polymorphism.
OOP: The Dominant Programming Methodology.
Designing with OOP in Mind.
Class-Responsibility-Collaborator.
Design Patterns.
Moving from C++ to Java.
Appendix A: ASCII Character Codes.
Appendix B: Operator Precedence and Associativity.
Appendix C: Language Guide.
Lexical Elements.
Identifiers.
Keywords.
Constants.
Declarations and Scope Rules.
Namespaces.
Linkage Rules.
Types.
Conversion Rules and Casts.
Expressions and Operators.
Autoincrement and Autodecrement Expressions.
Arithmetic Expressions.
Relational, Equality, and Logical Expressions.
Assignment Expressions.
Comma Expressions.
Conditional Expressions.
Bit-Manipulation Expressions.
Address and Indirection Expressions.
new and delete Expressions.
Other Expressions.
Statements.
The Compound Statement.
The if and if-else Statements.
The while Statement.
The for Statement.
The do Statement.
The Break and Continue Statements.
The switch Statement.
The go to Statement.
The return Statement.
The Declaration Statement.
Functions.
Call-by-Reference.
Inline Functions.
Default Arguments.
Overloading.
Type-Safe Linkage for Functions.
Classes.
Member Functions.
Friend Functions.
The this Pointer.
Operator Overloading.
static and const Member Functions.
Mutable.
Inheritance.
Constructor Invocation.
Abstract Base Classes.
Pointer to Class Member.
Runtime Type Identification.
Virtual Functions.
Templates.
Function Template.
Friends.
Static Members.
Specialization.
Exceptions.
Try Blocks.
Handlers.
Exception Specification.
Terminate() and Unexpected().
Standard Library Exceptions.
Caution and Compatibility.
Type Compatibilities.
Miscellaneous.
New Features in C++.
Appendix D: Input/Output.
Formatted Output and iomanip.
User-Defined Types: Output.
The Input Class istream.
Files.
Using Strings as Streams.
The Functions and Macros in ctype.
Using Stream States.
Mixing I/O Libraries.
Appendix E: STL and String Libraries.
Associative Containers.
Container Adapters.
Iterators.
Iterator Adapters.
Algorithms.
Nonmutating Sequence Algorithms.
Mutating Sequence Algorithms.
Numerical Algorithms.
Functions.
Allocators.
String Library.
Member Functions.
Global Operators.
References.
Index. 0201395193T04062001
商品描述(中文翻譯)
描述
這本由知名 C++/C 專家 Ira Pohl 撰寫的經典書籍經過廣泛修訂和更新,專為正在從 C 轉向 C++ 的 C 程式設計師而寫。這本書採用漸進式教學方法,以 C 作為起點,以 C++ 作為目的地。第三版反映了新的 ANSI C++ 標準,並涵蓋了最新的語言特性,包括對模板、STL 和例外處理的詳細討論。
適合的課程
C++--中級程式設計,程式語言/比較語言。
目錄
(每章結尾都有摘要、複習問題和練習。)
前言。
1. C++ 和物件導向程式設計概述。
物件導向程式設計。
為什麼要學習 C++?
以 C 作為起點。
類別和抽象資料型別。
建構子和解構子。
重載。
運算子 +() 函數的剖析。
繼承。
從 C++ 轉向 Java。
改進的程式剖析。
物件導向程式設計的好處。
實用性。
2. 原生型別和語句。
程式元素。
註解。
關鍵字。
識別符。
字面量。
運算子和標點符號。
輸入/輸出。
程式結構。
簡單型別。
初始化。
傳統轉換。
列舉型別。
型別定義聲明。
表達式。
語句。
賦值和表達式。
複合語句。
if 和 if-else 語句。
while 語句。
for 語句。
do 語句。
break 和 continue 語句。
switch 語句。
goto 語句。
實用性。
從 C++ 轉向 Java。
月球程式的剖析。
3. 函數、指標和陣列。
函數。
函數調用。
函數定義。
return 語句。
函數原型。
遞迴。
預設參數。
函數作為參數。
重載函數。
內聯。
範圍和儲存類別。
儲存類別 auto。
儲存類別 extern。
儲存類別 register。
儲存類別 static。
連結的奧秘。
命名空間。
指標型別。
地址和解引用。
基於指標的引用傳遞。
order() 函數的剖析。
引用聲明和引用傳遞。
void 的用途。
陣列和指標。
下標。
初始化。
陣列和指標之間的關係。
將陣列傳遞給函數。
char 字串:一種核心語言 ADT。
多維陣列。
斷言和程式正確性。
自由儲存運算子 new 和 delete。
dynarray 程式的剖析。
實用性。
使用 Vector 代替陣列。
使用 String 代替 char。
從 C++ 轉向 Java。
Sum Array 程式的剖析。
4. 類別。
聚合型別 Struct 和 class。
結構指標運算子。
成員函數。
訪問:私有和公共。
類別。
類別範圍。
範圍解析運算子。
嵌套類別。
範例:Flush。
static 和 const 成員。
salary 程式的剖析。
可變成員。
this 指標。
聯合。
位元欄位。
容器類別範例:ch_stack。
實用性。
從 C++ 轉向 Java。
5. 建構子和解構子。
具有建構子的類別。
預設建構子。
建構子初始化器。
建構子作為轉換。
改進 point
類別。
構建動態大小的堆疊。
複製建構子。
具有解構子的類別。
範例:動態分配的字串。
my_string 類別的剖析。
dbl_vect 類別。
dbl_vect 作為線性向量型別。
成員為類型的成員。
範例:單向鏈結串列。
print() 和 release() 函數的剖析。
二維陣列。
多項式作為鏈結串列。
使用引用語義的字串。
無建構子、複製建構子和其他奧秘。
解構子的詳細資訊。
實用性。
從 C++ 轉向 Java。
6. 運算子重載和轉換。
ADT 轉換。
重載和函數選擇。
rational 程式的剖析。
友元函數。
運算子重載。
一元運算子重載。
二元運算子重載。
重載賦值和下標運算子。
dbl_vect::operator=() 函數的剖析。
多項式:型別和語言期望。
重載 I/O 運算子 << 和 >>。
重載運算子 () 以進行索引。