C++ Primer 5th Edition by Josée Lajoie and Barbara E. Moo
Book Details :
LanguageEnglish
Pages1399
FormatPDF
Size50.3 MB


C++ Primer 5th Edition by Josée Lajoie and Barbara E. Moo



C++ Primer 5th Edition by Stanley B. Lippman, Josée Lajoie, and Barbara E. Moo | PDF Free Download.

C++ Primer Contents


  • Chapter 1 Getting Started

Part I The Basics

  • Chapter 2 Variables and Basic Types
  • Chapter 3 Strings, Vectors, and Arrays
  • Chapter 4 Expressions
  • Chapter 5 Statements
  • Chapter 6 Functions
  • Chapter 7 Classes

Part II The C++ Library

  • Chapter 8 The IO Library
  • Chapter 9 Sequential Containers
  • Chapter 10 Generic Algorithms
  • Chapter 11 Associative Containers
  • Chapter 12 Dynamic Memory

Part III Tools for Class Authors

  • Chapter 13 Copy Control
  • Chapter 14 Overloaded Operations and Conversions
  • Chapter 15 Object-Oriented Programming
  • Chapter 16 Templates and Generic Programming

Part IV Advanced Topics

  • Chapter 17 Specialized Library Facilities
  • Chapter 18 Tools for Large Programs
  • Chapter 19 Specialized Tools and Techniques

Preface to C++ Primer PDF


Countless programmers have learned C++ from previous editions of C++ Primer. During that time, C++ has matured greatly: Its focus, and that of its programming community, has widened from looking mostly at machine efficiency to devoting more attention to programmer efficiency.

In 2011, the C++ standards committee issued a major revision to the ISO C++ standard. This revised standard is the latest step in C++’s evolution and continues the emphasis on programmer efficiency.

The primary goals of the new standard are to 

  • Make the language more uniform and easier to teach and to learn 
  • Make the standard libraries easier, safer, and more efficient to use 
  • Make it easier to write efficient abstractions and libraries

In this edition, we have completely revised the C++ Primer to use the latest standard. You can get an idea of how extensively the new standard has affected C++ by reviewing the New Features Table of Contents, which lists the sections that cover new material and appears on page xxi.

Some additions in the new standard, such as auto for type inference, are pervasive. These facilities make the code in this edition easier to read and to understand.

Programs (and programmers!) can ignore type details, which makes it easier to concentrate on what the program is intended to do.

Other new features, such as smart pointers and move-enabled containers, let us write more sophisticated classes without having to contend with the intricacies of resource management.

As a result, we can start to teach how to write your own classes much earlier in the book than we did in the Fourth Edition.

We and you no longer have to worry about many of the details that stood in our way under the previous standard. We’ve marked those parts of the text that cover features defined by the new standard, with a marginal icon.

We hope that readers who are already familiar with the core of C++ will find these alerts useful in deciding where to focus their attention. We also expect that these icons will help explain error messages from compilers that might not yet support every new feature.

Although nearly all of the examples in this book have been compiled under the current release of the GNU compiler, we realize some readers will not yet have access to completely updated compilers.

Even though numerous capabilities have been added by the latest standard, the core language remains unchanged and forms the bulk of the material that we cover. Readers can use these icons to note which capabilities may not yet be available in their compiler.

Why Read C++ Primer 5th Edition PDF

Modern C++ can be thought of as comprising three parts: 

  • The low-level language, much of which is inherited from C 
  • More advanced language features that allow us to define our own types and to organize large-scale programs and systems 
  • The standard library, which uses these advanced features to provide useful data structures and algorithms

Most texts present C++ in the order in which it evolved. They teach the C subset of C++ first and present the more abstract features of C++ as advanced topics at the end of the book. There are two problems with this approach:

Readers can get bogged down in the details inherent in low-level programming and give up in frustration.

Those who do press on learn bad habits that they must unlearn later. We take the opposite approach: Right from the start, we use the features that let programmers ignore the details inherent in low-level programming.

For example, we introduce and use the library string and vector types along with the built-in arithmetic and array types. Programs that use these library types are easier to write, easier to understand, and much less error-prone. Too often, the library is taught as an “advanced” topic.

Instead of using the library, many books use low-level programming techniques based on pointers to character arrays and dynamic memory management.

Getting programs that use these low-level techniques to work correctly is much harder than writing the corresponding C++ code using the library.

Throughout C++ Primer, we emphasize good style: We want to help you, the reader, develop good habits immediately and avoid needing to unlearn bad habits as you gain more sophisticated knowledge. We highlight particularly tricky matters and warn about common misconceptions and pitfalls. We also explain the rationale behind the rules explaining why not just what.

We believe that by understanding why things work as they do, readers can more quickly cement their grasp of the language.

Although you do not need to know C in order to understand this book, we assume you know enough about programming to write, compile, and run a program in at least one modern block-structured language.

In particular, we assume you have used variables, written and called functions, and used a compiler.

Changes to C++ Primer 5th Edition

New to this edition of C++ Primer are icons in the margins to help guide the reader. C++ is a large language that offers capabilities tailored to particular kinds of programming problems.

Some of these capabilities are of great importance for large project teams but might not be necessary for smaller efforts.

As a result, not every programmer needs to know every detail of every feature. We’ve added these marginal icons to help the reader know which parts can be learned later and which topics are more essential. 

We’ve marked sections that cover the fundamentals of the language with an image of a person studying a book. The topics covered in sections marked this way form the core part of the language. Everyone should read and understand these sections.

We’ve also indicated those sections that cover advanced or special-purpose topics. These sections can be skipped or skimmed on a first reading. We’ve marked such sections with a stack of books to indicate that you can safely put down the book at that point.

It is probably a good idea to skim such sections so you know that the capability exists. However, there is no reason to spend time studying these topics until you actually need to use the feature in your own programs.

To help readers guide their attention further, we’ve noted particularly tricky concepts with a magnifying-glass icon.

We hope that readers will take the time to understand thoroughly the material presented in the sections so marked.

In at least some of these sections, the import of the topic may not be readily apparent; but we think you’ll find that these sections cover topics that turn out to be essential to understanding the language.

Another aid to reading this book is our extensive use of cross-references. We hope these references will make it easier for readers to dip into the middle of the book, yet easily jump back to the earlier material on which later examples rely.

What remains unchanged is that C++ Primer is a clear, correct, and thorough tutorial guide to C++. We teach the language by presenting a series of increasingly sophisticated examples, which explain language features and show how to make the best use of C++.

Download C++ Primer 5th Edition by Josée Lajoie and Barbara E. Moo in PDF Format For Free.