The C++ Programming Language

The C++ Programming Language

by Bjarne Stroustrup
The C++ Programming Language

The C++ Programming Language

by Bjarne Stroustrup

eBook

$56.99  $75.99 Save 25% Current price is $56.99, Original price is $75.99. You Save 25%.

Available on Compatible NOOK devices, the free NOOK App and in My Digital Library.
WANT A NOOK?  Explore Now

Related collections and offers


Overview

The new C++11 standard allows programmers to express ideas more clearly, simply, and directly, and to write faster, more efficient code. Bjarne Stroustrup, the designer and original implementer of C++, has reorganized, extended, and completely rewritten his definitive reference and tutorial for programmers who want to use C++ most effectively.

 

The C++ Programming Language, Fourth Edition, delivers meticulous, richly explained, and integrated coverage of the entire language—its facilities, abstraction mechanisms, standard libraries, and key design techniques. Throughout, Stroustrup presents concise, “pure C++11” examples, which have been carefully crafted to clarify both usage and program design. To promote deeper understanding, the author provides extensive cross-references, both within the book and to the ISO standard.

 

New C++11 coverage includes

  • Support for concurrency
  • Regular expressions, resource management pointers, random numbers, and improved containers
  • General and uniform initialization, simplified for-statements, move semantics, and Unicode support
  • Lambdas, general constant expressions, control over class defaults, variadic templates, template aliases, and user-defined literals
  • Compatibility issues 

Topics addressed in this comprehensive book include

  • Basic facilities: type, object, scope, storage, computation fundamentals, and more
  • Modularity, as supported by namespaces, source files, and exception handling
  • C++ abstraction, including classes, class hierarchies, and templates in support of a synthesis of traditional programming, object-oriented programming, and generic programming
  • Standard Library: containers, algorithms, iterators, utilities, strings, stream I/O, locales, numerics, and more
  • The C++ basic memory model, in depth 

This fourth edition makes C++11 thoroughly accessible to programmers moving from C++98 or other languages, while introducing insights and techniques that even cutting-edge C++11 programmers will find indispensable.

 

This book features an enhanced, layflat binding, which allows the book to stay open more easily when placed on a flat surface. This special binding method—noticeable by a small space inside the spine—also increases durability.


Product Details

ISBN-13: 9780133522853
Publisher: Pearson Education
Publication date: 07/10/2013
Sold by: Barnes & Noble
Format: eBook
Pages: 1376
File size: 37 MB
Note: This product may take a few minutes to download.
Age Range: 18 Years

About the Author

Bjarne Stroustrup (www.stroustrup.com) is the designer and original implementer of C++, as well as the author of Programming: Principles and Practice Using C++ (Addison-Wesley, 2009), The C++ Programming Language (Addison-Wesley, 1985, 1991, 1997, 2000), and many popular and academic publications. Dr. Stroustrup is a University Distinguished Professor at Texas A&M University and the holder of the College of Engineering Chair in Computer Science. He is a member of the U.S. National Academy of Engineering, an IEEE Fellow, and an ACM fellow. His research interests include distributed systems, design, programming techniques, software development tools, and programming languages. He is actively involved in the ISO standardization of C++.

Read an Excerpt

PREFACE:

The C Programming Language, Third Edition

Bjarne Stroustrup


Preface


Programming is understanding.
- Kristen Nygaard

I find using C more enjoyable than ever. C's support for design and programming has improved dramatically over the years, and lots of new helpful techniques have been developed for its use. However, C is not just fun. Ordinary practical programmers have achieved significant improvements in productivity, maintainability, flexibility, and quality in projects of just about any kind and scale. By now, C has fulfilled most of the hopes I originally had for it, and also succeeded at tasks I hadn't even dreamt of.

This book introduces standard C* and the key programming and design techniques supported by C. Standard C is a far more powerful and polished language than the version of C introduced by the first edition of this book. New language features such as name spaces, exceptions, templates, and run-time type identification allow many techniques to be applied more directly than was possible before, and the standard library allows the programmer to start from a much higher level than the bare language.

About a third of the information in the second edition of this book came from the first. This third edition is the result of a rewrite of even larger magnitude. It offers something to even the most experienced C programmer; at the same time, this book is easier for the novice to approach that its predecessors were. The explosion of C use and the massive amount of experience accumulated as a result makes this possible.

The definition of an extensive standard library makes adifference to the way C concepts can be presented. As before, this book presents C independently of any particular implementation, and as before, the tutorial chapters present language constructs and concepts in a "bottom up" order so that a construct is used only after it has been defined. However, it is much easier to use a well-designed library than it is to understand the details of its implementation. Therefore the standard library can be used to provide realistic and interesting examples well before a reader can be assumed to understand its inner workings. the standard library itself is also a fertile source of programming examples and design techniques.

This book presents every major C language feature and the standard library. It is organized around language and library facilities. However, features are presented in the context of their use. That is, the focus is on the language as the tool for design and programming rather than on the language in itself. This book demonstrates key techniques that make C effective and teaches the fundamental concepts necessary for mastery. Except where illustrating technicalities, examples are taken from the domain of systems software. A companion, The Annotated C Language Standard, presents the complete language definition together with annotations to make it more comprehensible.

The primary aim of this book is to help the reader understand how the facilities offered by C support key programming techniques. The aim is to take the reader far beyond the point where he or she gets code running primarily by copying examples and emulation programming styles from other languages. Only a good understanding of the ideas behind the language facilities leads to mastery. Supplemented by implementation documentation, the information provided is sufficient for completing significant real-world projects. The hope is that this book will help the reader gain new insights and become a better programmer and designer.

Acknowledgements
In addition to the people mentioned in the acknowledgment section of the first and second editions, I would like to thank Matt Austern, Hans Boehm, Don Caldwell, Lawrence Crowl, Alan Feuer, Andrew Forrest, Tim Griffin, Peter Juhl, Brian Kernighan, Andrew Koenig, Mike Mowbray, Rob Murray, Lee Nackman, Joseph Newcomer, Alex Stepanov, David Vandevoorde, Peter Weinberger, and Chris Van Wyk for commenting on draft chapters of this third edition.

I would also like to thank the volunteers on the C standards committees who did an immense amount of constructive work to make C what it is today. It is slightly unfair to single out individuals, but it would be even more unfair not to mention anyone, so I'd like to especially mention Mike Ball, Dag Brück, Sean Corfield, Ted Goldstein, Kim Knutilla, Andrew Koenig, Josée Lajoie, Dmitry Lenkov, Nathan Myers, Martin O'Riordan, Tom Plum, Jonathan Shopiro, John Spicer, Jerry Schwarz, Alex Stepanov, and Mike Vilot, as people who each directly cooperated with me over some part of C and its standard library.

Bjarne Stroustrup
Murray Hill, New Jersey


*At the time of writing, the C Standard is still only a "Final Committee Draft Standard." However, no significant changes to the language or the standard library are anticipated.



Table of Contents

  • Part I: Introductory Material
  • Chapter 1: Notes to the Reader
  • Chapter 2: A Tour of C++: The Basics
  • Chapter 3: A Tour of C++: Abstraction Mechanisms
  • Chapter 4: A Tour of C++: Containers and Algorithms
  • Chapter 5: A Tour of C++: Concurrency and Utilities
  • Part II: Basic Facilities
  • Chapter 6: Types and Declarations  
  • Chapter 7: Pointers, Arrays, and References
  • Chapter 8: Structures, Unions, and Enumerations
  • Chapter 9: Statements
  • Chapter 10: Expressions
  • Chapter 11: Select Operations
  • Chapter 12: Functions
  • Chapter 13: Exception Handling
  • Chapter 14: Namespaces
  • Chapter 15: Source Files and Programs
  • Part III: Abstraction Mechanisms
  • Chapter 16: Classes   
  • Chapter 17: Construction, Cleanup, Copy, and Move
  • Chapter 18: Overloading
  • Chapter 19: Special Operators
  • Chapter 20: Derived Classes
  • Chapter 21: Class Hierarchies
  • Chapter 22: Run-Time Type Information
  • Chapter 23: Templates
  • Chapter 24: Generic Programming
  • Chapter 25: Specialization
  • Chapter 26: Instantiation
  • Chapter 27: Templates and Hierarchies
  • Chapter 28: Metaprogramming
  • Chapter 29: A Matrix Design
  • Part IV: The Standard Library
  • Chapter 30: Standard Library Summary  
  • Chapter 31: STL Containers
  • Chapter 32: STL Algorithms
  • Chapter 33: STL Iterators
  • Chapter 34: Memory and Resources
  • Chapter 35: Utilities
  • Chapter 36: Strings
  • Chapter 37: Regular Expressions
  • Chapter 38: I/O Streams
  • Chapter 39: Locales
  • C

Preface

PREFACE:

The C Programming Language, Third Edition

Bjarne Stroustrup


Preface


Programming is understanding.
- Kristen Nygaard

I find using C more enjoyable than ever. C's support for design and programming has improved dramatically over the years, and lots of new helpful techniques have been developed for its use. However, C is not just fun. Ordinary practical programmers have achieved significant improvements in productivity, maintainability, flexibility, and quality in projects of just about any kind and scale. By now, C has fulfilled most of the hopes I originally had for it, and also succeeded at tasks I hadn't even dreamt of.

This book introduces standard C* and the key programming and design techniques supported by C. Standard C is a far more powerful and polished language than the version of C introduced by the first edition of this book. New language features such as name spaces, exceptions, templates, and run-time type identification allow many techniques to be applied more directly than was possible before, and the standard library allows the programmer to start from a much higher level than the bare language.

About a third of the information in the second edition of this book came from the first. This third edition is the result of a rewrite of even larger magnitude. It offers something to even the most experienced C programmer; at the same time, this book is easier for the novice to approach that its predecessors were. The explosion of C use and the massive amount of experience accumulated as a result makes this possible.

The definition of an extensive standard library makesadifference to the way C concepts can be presented. As before, this book presents C independently of any particular implementation, and as before, the tutorial chapters present language constructs and concepts in a "bottom up" order so that a construct is used only after it has been defined. However, it is much easier to use a well-designed library than it is to understand the details of its implementation. Therefore the standard library can be used to provide realistic and interesting examples well before a reader can be assumed to understand its inner workings. the standard library itself is also a fertile source of programming examples and design techniques.

This book presents every major C language feature and the standard library. It is organized around language and library facilities. However, features are presented in the context of their use. That is, the focus is on the language as the tool for design and programming rather than on the language in itself. This book demonstrates key techniques that make C effective and teaches the fundamental concepts necessary for mastery. Except where illustrating technicalities, examples are taken from the domain of systems software. A companion, The Annotated C Language Standard, presents the complete language definition together with annotations to make it more comprehensible.

The primary aim of this book is to help the reader understand how the facilities offered by C support key programming techniques. The aim is to take the reader far beyond the point where he or she gets code running primarily by copying examples and emulation programming styles from other languages. Only a good understanding of the ideas behind the language facilities leads to mastery. Supplemented by implementation documentation, the information provided is sufficient for completing significant real-world projects. The hope is that this book will help the reader gain new insights and become a better programmer and designer.

Acknowledgements
In addition to the people mentioned in the acknowledgment section of the first and second editions, I would like to thank Matt Austern, Hans Boehm, Don Caldwell, Lawrence Crowl, Alan Feuer, Andrew Forrest, Tim Griffin, Peter Juhl, Brian Kernighan, Andrew Koenig, Mike Mowbray, Rob Murray, Lee Nackman, Joseph Newcomer, Alex Stepanov, David Vandevoorde, Peter Weinberger, and Chris Van Wyk for commenting on draft chapters of this third edition.

I would also like to thank the volunteers on the C standards committees who did an immense amount of constructive work to make C what it is today. It is slightly unfair to single out individuals, but it would be even more unfair not to mention anyone, so I'd like to especially mention Mike Ball, Dag Brück, Sean Corfield, Ted Goldstein, Kim Knutilla, Andrew Koenig, Josée Lajoie, Dmitry Lenkov, Nathan Myers, Martin O'Riordan, Tom Plum, Jonathan Shopiro, John Spicer, Jerry Schwarz, Alex Stepanov, and Mike Vilot, as people who each directly cooperated with me over some part of C and its standard library.

Bjarne Stroustrup
Murray Hill, New Jersey


*At the time of writing, the C Standard is still only a "Final Committee Draft Standard." However, no significant changes to the language or the standard library are anticipated.



From the B&N Reads Blog

Customer Reviews