In C++ Distilled, veteran educator and programmer Ira Pohl condenses 700 pages of proposed ANSI standard into a concise road map to C++. Selecting the most important and commonly used language elements, Pohl provides syntax, semantics, and examples, as well as style tips that he has distilled from over two decades of programming experience. C++ Distilled is a quick and handy reference to the most recent additions to the language, many of which have yet to be covered in any other book on C++.Features
Click below for Source Code related to this title:
1. Program Structure.
2. Lexical Elements.
Autoincrement and Autodecrement Expressions.
Relational, Equality, and Logical Expressions.
Bit Manipulation Expressions.
Address and Indirection Expressions.
new and delete 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.
The return Statement.
The Declaration Statement.
Type-Safe Linkage for Functions.
Constructors and Destructors.
The this Pointer.
static and const Member Functions.
Abstract Base Classes.
Pointer to Class Member.
Run-Time Type Identification.
terminate() and unexpected().
Standard Library Exceptions.
The Output Class ostream.
Formatted Output and iomanip.h.
User-Defined Types: Output.
The Input Class istream.
Using Strings as Streams.
The Functions and Macros in ctype.h.
Using Stream States.
Mixing I/O Libraries.
Nested Class Declarations.
C++ Distilled: A Concise ANSI/ISO Reference and Style Guide is a companion volume for the student or professional programmer who uses ANSI C++, including the I/O, and STL library. It supplements and brings up-to-date existing literature.
This book is a concise road map and style guide to C++. It selectively previews the proposed ANSI standard C++ language and includes many programming tips. It is easily used with any C++ programming book (see Chapter 20, "References," on page 189, for a selection), but is especially suitable when used with one of the author's books, such as Object-Oriented Programming Using C++, 2nd Edition (reference OPUS 97).
Each section has the syntax, semantics, and examples of the language element. There are style and programming tips at the end of most sections. Examples have a consistent professional style to be mimicked by programmers.
This book is a distillation of the ANSI standard, which is approximately 700 detailed technically dense pages, and rather overwhelming. Fortunately most programmers do not need such detail; indeed, many of the features are highly specialized and little used. Most programmers need to be able to quickly review some syntax or semantics they have not recently used.
C++ has had many recent additions, including STL, namespaces, RTTI, and the
bool type. These can be used readily by someone already proficient in basic C++, but most books have yet to treat these topics. This book can provide a handy guide to these new constructs.
The examples both within the book are intended to exhibit good programming style. Most programming is done in my imitation of existing code and idioms. These examples use my prescriptions and programming tips ("Dr. P's Prescriptions") which are a distillation of considerable professional practice.
The Addison-Wesley web site contains the programs in this book as well as adjunct programs that illustrate the points made in the book or flesh out short pieces of programs. The programs available at the web site are introduced by their .cpp or .h names.
In file hello1.cpp
Style emphasizes clarity and community norms. Consistency, while the hobgoblin of small minds, is well suited to large computer codes.
This book was developed with the support of my editor J. Carter Shanklin, editorial assistant Angela Buenning, and production coordinator Pamela Yee. Thanks also to reviewers Ed Lansinger of General Motors Corporation; Henry A. Etlinger of Rochester Institute of Technology; Glen Deen of Deen Publications, Inc.; Michael Keenan of Columbus State University; and David Gregory. Most importantly, I thank Debra Dolsberry for her invaluable help in the technical editing of this book, and her careful testing of the code.
Click below for Errata related to this title:
Updates and Explanations