Prix bas
CHF41.05
Habituellement expédié sous 2 à 4 semaines.
This editon reflects ANSI C++ Standard, and covers language features - including detailed discussions of templates, STL, and exception handling. Each chapter contains a brief examination of Java that compares and contrasts it with C++, providing the C programmer with a more complete understanding of both C and C++ and their relationship to Java.
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.
Auteur
Ira Pohl is a Professor of Computer Science at the University of California, Santa Cruz and holds a Ph.D. in Computer Science from Stanford University. His research interests include artificial intelligence, the C and C++ programming languages, practical complexity problems, heuristic search methods, deductive algorithms, and educational and social issues. He originated error analysis in heuristic search methods and deductive algorithms.
Professor Pohl was formerly a Mackay professor at University of California- Berkeley and a ZWO fellow in the Netherlands. He is the author or co-author of Object-Oriented Programming Using C++, C++ Distilled: A Concise Ansi/Iso Reference and Style Guide, C by Dissection: The Essentials of C Programming, A Book on C: Programming in C, C++ for C Programmers, C++ for Fortran Programmers, C++ for Pascal Programmers, and Turbo C: The Essentials of C Programming, all published by Addison-Wesley.
0201395193AB04062001
Résumé
This text builds on programmers knowledge of C to make a seamless transition to C++. It briefly examines Java to compare and contrast it with the features of C++.
Contenu
(Each chapter concludes with a Summary, Review Questions and Exercises.)
Preface.
1. An Overview of C++ and Object-Oriented Programming.
Object-Oriented Programming.
Why Learn C++?
C as a Starting Point.
Classes and Abstract Data Types.
Constructors and Destructors.
Overloading.
Dissection of the Operator+() Function.
Inheritance.
Moving from C++ to Java.
Dissection of the improved Program.
Benefits of Object-Oriented Programming.
Pragmatics.
2. Native Types and Statements.
Program Elements.
Comments.
Keywords.
Identifiers.
Literals.
Operators and Punctuators.
Input/Output.
Program Structure.
Simple Types.
Initialization.
The Traditional Conversions.
Enumeration Types.
Typedef Declarations.
Expressions.
Statements.
Assignment and Expressions.
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 goto Statement.
Pragmatics.
Moving from C++ to Java.
Dissection of the Moon Program.
3. Functions, Pointers, and Arrays.
Functions.
Function Invocation.
Function Definition.
The return Statement.
Function Prototypes.
Recursion.
Default Arguments.
Functions as Arguments.
Overloading Functions.
Inlining.
Scope and Storage Class.
The Storage Class auto.
The Storage Class extern.
The Storage Class register.
The Storage Class static.
Linkage Mysteries.
Namespaces.
Pointer Types.
Addressing and Dereferencing.
Pointer-Based Call-by-Reference.
Dissection of the order() Function.
Reference Declarations and Call-by-Reference.
The Uses of void.
Arrays and Pointers.
Subscripting.
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.
Dissection of the dynarray Program.
Pragmatics.
Vector Instead of Array.
String Instead of char.
Moving from C++ to Java.
Dissection of the Sum Array Program.
4. Classes.
The Aggregate Type Struct and class.
Structure Pointer Operator.
Member Functions.
Access: Private and Public.
Classes.
Class Scope.
Scope Resolution Operator.
Nested Classes.
An Example: Flushing.
static and const Members.
Dissection of the salary Program.
Mutable Members.
The this Pointer.
Unions.
Bit Fields.
A Container Class Example: ch_stack.
Pragmatics.
Moving from C++ to Java.
5. Constructors and Destructors.
Classes with Constructors.
The Default Constructor.
Constructor Initializer.
Constructors as Conversions.
Improving the point Class.
Constructing a Dynamically Sized Stack.
The Copy Constructor.
Classes with Destructors.
An Example: Dynamically Allocated Strings.
Dissection of the my_string Class.
The Class dbl_vect.
dbl_vect as a Linear Vector Type.
Members That Are Class Types.
Example: A Singly Linked List.
Dissection of the print() and release() Functions.
Two-Dimensional Arrays.
Polynomials as a Linked List.
Strings Using Reference Semantics.
No Constructor, Copy Constructor, and Other Mysteries.
Destructor Details.
Pragmatics.
Moving from C++ to Java.
6. Operator Overloading and Conversions.
ADT Conversions.
Overloading and Function Selection.
Dissection of the rational Program.
Friend Functions.
Overloading Operators.
Unary Operator Overloading.
Binary Operator Overloading.
Overloading Assignment and Subscripting Operators.
Dissection of dbl_vect::operator=() Function.
Polynomial: Type and Language Expectations.
Overloading I/O Operators >.
Overloading Operator () for Indexing.
Dissection of the Class matrix.
Overloading the Pointer Operator ->.
Overloading new and delete.
Pragmatics.
Signature Matching.
Moving from C++ to Java.
7. Templates, Generic Programming, and STL.
Template Class stack.
Function Templates.
Signature Matching and Overloading.
Class Templates.
Friends.
Static Members.
Class Template Arguments.
Default Template Arguments.
Member Templates.
Parameterizing the Class vector.
STL.
STL Example Code.
Containers.
Sequence Containers.
Dissection of the stl_vect Program.
Associative Containers.
Container Adapters.
Iterators.
The istream_iterator and ostream_iterator.
Iterator Adapters.
Algorithms.
Sorting Algorithms.
Nonmutating Sequence Algorithms.
Mutating Sequence Algorithms.
Numerical Algorithms.
Numerical Integration Made Easy.
Pragmatics.
Moving from C++ to Java.
8. Inheritance.
A Derived Class.
Typing Conversions and Visibility.
Virtual Functions.
Abstract Base Classes.
Templates and Inheritance.
Multiple Inheritance.
Inheritance and Design.
Subtyping Form.
Code Reuse.
Runtime Type Identification.
Pragmatics.
Moving from C++ to Java.
9. Exceptions.
Using the assert Library.
C++ Exceptions.
Throwing Exceptions.
Rethrown 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++.
OOP Language Requirements.
ADTs: Encapsulation and Data Hiding.
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 …