书籍详情
C和C++代码锦囊:实用开发者指南(英文本)
作者:(美)Chuck Allison编著
出版社:科学出版社
出版时间:2004-01-01
ISBN:9787030124692
定价:¥60.00
购买这本书可以去
内容简介
本书指导读者如何充分利用标准C和C++库,其涵盖容器、迭代器、算法、文本与文件处理、时间与日期处理以及内存管理等内容。同时本书提供了非常实用的有关抽象、模板、二进制处理、可见度、控制结构和异常处理的使用技巧。本书还提供了C和C++的大量编程范例,对于进行实用开发的人员具有很大的借鉴和指导意义。各类读者均能从中获得裨益,提高C/C++的编程水平。
作者简介
暂缺《C和C++代码锦囊:实用开发者指南(英文本)》作者简介
目录
Foreword
Bruce Eckel
Preface
C++: The Making of a Standard
An Interview with Bjarne Stroustrup
Part I Preliminaries
1 A Better C
A Tale Of Two Languages
Incremental Journey
The Type System
Function Prototypes
Type-safe Linkage
References
Type-safe I/O
Standard Streams
Formatting
Manipulators
Function Overloading and Function Templates
Operator Overloading
Inline Functions
Default Arguments
new and delete
Statement Declarations
Standard Library Features
C Compatibility
Summary
2 Pointers
Programming on the Edge
The Basics
Pointer Arithmetic
Pass-By-Reference Semantics
Generic Pointers
const Pointers
Pointers and One-Dimensional Arrays
Arrays as Parameters
Arrays of Strings
Pointers and Multidimensional Arrays
Higher and Deeper
Pointers to Functions
Pointers to Member Functions
Encapsulation and Incomplete Types
Summary
3 The Preprocessor
The #include Directive
Other Preprocessor Directives
Predefined Macros
Conditional Compilation
Preprocessing Operators
Implementing assert
Macro Magic
Character Sets, Trigraphs, and Digraphs
Phases of Translation
Summary
4 The Standard C Library, Part I
For the Adequate Programmer
5 The Standard C Library, Part II
For the Polished Programmer
Appendix 5.1: Character Sets
Code Pages
Character Set Standards
ISO 10646
Unicode
6 The Standard C Library, Part III
For the Complete Programmer
va_list's As Arguments
An Application
Conclusion
Appendix 6.1: Floating-point Number Systems
Part II Key Concepts
7 Abstraction
Data Abstraction
Operator Overloading
Concrete Data Types
Type Abstraction
Function Abstraction
Summary
8 Templates
Generic Programming
Function Templates
Class Templates
Template Parameters
Template Specialization
Summary
9 Bit Manipulation
Bitwise Operators
Accessing Individual Bits
Large Bitsets
Bit Strings
Wish List
The bitset Template
The vector Template Specialization
Summary
10 Conversions and Casts
Integral Promotion
Demotions
Arithmetic Conversions
Function Prototypes
Explicit Conversions
Function-style Casts
Const Correctness
User-Defined Conversions
Beefing up operator [ ]
New-Style Casts
Summary
11 Visibility
What's In a Name?
Scope
Minimal Scoping
Class Scope
Nested Classes
Local Classes
Classic Namespaces
Namespace Scope
Lifetime
Lifetime of Temporaries
Linkage
Type-safe Linkage
"Language" Linkage
Summary
12 Control Structures
Structured Programming
Branching
Nonlocal Branching
Signals
Summary
References
13 Exceptions
Error Handling Alternatives
Stack Unwinding
Catching Exceptions
Standard Exceptions
Resource Management
Constructors and Exceptions
Memory Management
Exception Specifications
An Error-Handling Strategy
Summary
14 Object-oriented Programming
Inheritance
Heterogeneous Collections
Virtual Functions and Polymorphism
Abstract Base Classes
Case Study: A Framework for Object Persistence
Database Access
Mapping Objects to Relational Schema
PFX Architecture
A Code Walkthrough
Summary
Part III Leveraging the Standard Library
15 Algorithms
Complexity
Generic Algorithms
Function Objects
Function Taxonomy
Function Object Adapters
Algorithm Taxonomy
Summary
References
16 Containers and Iterators
Standard Containers
Iterators
Iterator Taxonomy
Special-Purpose Iterators
Container Adapters
Associative Containers
Applications
Non-STL Containers
Summary
17 Text Processing
scanf
printf
Substrings
The Standard C++ String Class
String Streams
Wide Strings
Summary
18 File Processing
Filters
Binary Files
Record Processing
Temporary Files
Portability
POSIX
File Descriptors
Copying Files via Descriptors
Reading Directory Entries
Redirecting Standard Error
Encapsulating Directory Operations
Summary
19 Time and Date Processing
Julian Day Encoding
Date Classes for Real Work
Calculating the Week of the Year
Summary
Reference
20 Dynamic Memory Management
Ragged Arrays
Using the Heap in Standard C
The C++ Free Store
Deep versus Shallow Copy
Handling Memory Allocation Failure
Overriding new and delete
Placement new
Managing the Heap
Avoiding Memory Management
Summary
Appendices
A C/C++ Compatibility
B Standard C++ Algorithms
C Function Objects and Adapters
Function Objects
Function Object Adapters
D Annotated Bibliography
The C Practitioner's Booklist
The C++ Practitioner's Booklist
Index
Bruce Eckel
Preface
C++: The Making of a Standard
An Interview with Bjarne Stroustrup
Part I Preliminaries
1 A Better C
A Tale Of Two Languages
Incremental Journey
The Type System
Function Prototypes
Type-safe Linkage
References
Type-safe I/O
Standard Streams
Formatting
Manipulators
Function Overloading and Function Templates
Operator Overloading
Inline Functions
Default Arguments
new and delete
Statement Declarations
Standard Library Features
C Compatibility
Summary
2 Pointers
Programming on the Edge
The Basics
Pointer Arithmetic
Pass-By-Reference Semantics
Generic Pointers
const Pointers
Pointers and One-Dimensional Arrays
Arrays as Parameters
Arrays of Strings
Pointers and Multidimensional Arrays
Higher and Deeper
Pointers to Functions
Pointers to Member Functions
Encapsulation and Incomplete Types
Summary
3 The Preprocessor
The #include Directive
Other Preprocessor Directives
Predefined Macros
Conditional Compilation
Preprocessing Operators
Implementing assert
Macro Magic
Character Sets, Trigraphs, and Digraphs
Phases of Translation
Summary
4 The Standard C Library, Part I
For the Adequate Programmer
5 The Standard C Library, Part II
For the Polished Programmer
Appendix 5.1: Character Sets
Code Pages
Character Set Standards
ISO 10646
Unicode
6 The Standard C Library, Part III
For the Complete Programmer
va_list's As Arguments
An Application
Conclusion
Appendix 6.1: Floating-point Number Systems
Part II Key Concepts
7 Abstraction
Data Abstraction
Operator Overloading
Concrete Data Types
Type Abstraction
Function Abstraction
Summary
8 Templates
Generic Programming
Function Templates
Class Templates
Template Parameters
Template Specialization
Summary
9 Bit Manipulation
Bitwise Operators
Accessing Individual Bits
Large Bitsets
Bit Strings
Wish List
The bitset Template
The vector Template Specialization
Summary
10 Conversions and Casts
Integral Promotion
Demotions
Arithmetic Conversions
Function Prototypes
Explicit Conversions
Function-style Casts
Const Correctness
User-Defined Conversions
Beefing up operator [ ]
New-Style Casts
Summary
11 Visibility
What's In a Name?
Scope
Minimal Scoping
Class Scope
Nested Classes
Local Classes
Classic Namespaces
Namespace Scope
Lifetime
Lifetime of Temporaries
Linkage
Type-safe Linkage
"Language" Linkage
Summary
12 Control Structures
Structured Programming
Branching
Nonlocal Branching
Signals
Summary
References
13 Exceptions
Error Handling Alternatives
Stack Unwinding
Catching Exceptions
Standard Exceptions
Resource Management
Constructors and Exceptions
Memory Management
Exception Specifications
An Error-Handling Strategy
Summary
14 Object-oriented Programming
Inheritance
Heterogeneous Collections
Virtual Functions and Polymorphism
Abstract Base Classes
Case Study: A Framework for Object Persistence
Database Access
Mapping Objects to Relational Schema
PFX Architecture
A Code Walkthrough
Summary
Part III Leveraging the Standard Library
15 Algorithms
Complexity
Generic Algorithms
Function Objects
Function Taxonomy
Function Object Adapters
Algorithm Taxonomy
Summary
References
16 Containers and Iterators
Standard Containers
Iterators
Iterator Taxonomy
Special-Purpose Iterators
Container Adapters
Associative Containers
Applications
Non-STL Containers
Summary
17 Text Processing
scanf
printf
Substrings
The Standard C++ String Class
String Streams
Wide Strings
Summary
18 File Processing
Filters
Binary Files
Record Processing
Temporary Files
Portability
POSIX
File Descriptors
Copying Files via Descriptors
Reading Directory Entries
Redirecting Standard Error
Encapsulating Directory Operations
Summary
19 Time and Date Processing
Julian Day Encoding
Date Classes for Real Work
Calculating the Week of the Year
Summary
Reference
20 Dynamic Memory Management
Ragged Arrays
Using the Heap in Standard C
The C++ Free Store
Deep versus Shallow Copy
Handling Memory Allocation Failure
Overriding new and delete
Placement new
Managing the Heap
Avoiding Memory Management
Summary
Appendices
A C/C++ Compatibility
B Standard C++ Algorithms
C Function Objects and Adapters
Function Objects
Function Object Adapters
D Annotated Bibliography
The C Practitioner's Booklist
The C++ Practitioner's Booklist
Index
猜您喜欢