As the reader of this book, you are our most important critic and commentator. We value your opinion and want to know what we’re doing right, what we could do better, what areas you’d like to see us publish in, and any other words of wisdom you’re willing to pass our way.

You can email or write directly to let us know what you did or didn’t like about this book—as well as what we can do to make our books stronger.

Please note that we cannot help you with technical problems related to the topic of this book, and that due to the high volume of mail we receive, we might not be able to reply to every message.

When you write, please be sure to include this book’s title and author as well as your name, email address, and phone number.

Email:    feedback@developers-library.info

Mail:     Reader Feedback

Addison-Wesley Developer’s Library

800 East 96th Street

Indianapolis, IN 46240 USA

Reader Services

Visit our website and register this book at www.informit.com/register for convenient access to any updates, downloads, or errata that might be available for this book.

Introduction

Learning C++ is an adventure of discovery, particularly because the language accommodates several programming paradigms, including object-oriented programming, generic programming, and the traditional procedural programming. The fifth edition of this book described the language as set forth in the ISO C++ standards, informally known as C++99 and C++03, or, sometimes as C++99/03. (The 2003 version was largely a technical correction to the 1999 standard and didn’t add any new features.) Since then, C++ continues to evolve. As this book is written, the international C++ Standards Committee has just approved a new version of the standard. This standard had the informal name of C++0x while in development, and now it will be known as C++11. Most contemporary compilers support C++99/03 quite well, and most of the examples in this book comply with that standard. But many features of the new standard already have appeared in some implementations, and this edition of C++ Primer Plus explores these new features.

C++ Primer Plus discusses the basic C language and presents C++ features, making this book self-contained. It presents C++ fundamentals and illustrates them with short, to-the-point programs that are easy to copy and experiment with. You learn about input/output (I/O), how to make programs perform repetitive tasks and make choices, the many ways to handle data, and how to use functions. You learn about the many features C++ has added to C, including the following:

• Classes and objects

• Inheritance

• Polymorphism, virtual functions, and runtime type identification (RTTI)

• Function overloading

• Reference variables

• Generic, or type-independent, programming, as provided by templates and the Standard Template Library (STL)

• The exception mechanism for handling error conditions

• Namespaces for managing names of functions, classes, and variables

The Primer Approach

C++ Primer Plus brings several virtues to the task of presenting all this material. It builds on the primer tradition begun by C Primer Plus nearly two decades ago and embraces its successful philosophy:

• A primer should be an easy-to-use, friendly guide.

• A primer doesn’t assume that you are already familiar with all relevant programming concepts.

• A primer emphasizes hands-on learning with brief, easily typed examples that develop your understanding, a concept or two at a time.

• A primer clarifies concepts with illustrations.

• A primer provides questions and exercises to let you test your understanding, making the book suitable for self-learning or for the classroom.

Following these principles, the book helps you understand this rich language and how to use it. For example

• It provides conceptual guidance about when to use particular features, such as using public inheritance to model what are known as is-a relationships.

• It illustrates common C++ programming idioms and techniques.

• It provides a variety of sidebars, including tips, cautions, things to remember, compatibility notes, and real-world notes.

The author and editors of this book do our best to keep the presentation to-the-point, simple, and fun. Our goal is that by the end of the book, you’ll be able to write solid, effective programs and enjoy yourself doing so.

Sample Code Used in This Book

Перейти на страницу:

Все книги серии Developer's Library

Похожие книги