did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780201309935

C++ Primer Answer Book

by ;
  • ISBN13:

    9780201309935

  • ISBN10:

    0201309939

  • Edition: 1st
  • Format: Paperback
  • Copyright: 1998-12-18
  • Publisher: Addison-Wesley Professional
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $29.95

Summary

C++ has proven to be a popular programming language, and C++ Primer has proven to be just as popular among those wishing to learn the language. Learning a programming language, however, requires more than just reading about the language constructs. You must program, write your own code, and study code written by those who are more experienced with the use of the language.

To this end, Lippman and Lajoie (L&L) have provided exercises throughout C++ Primer to encourage their readers to test their understanding of the material. Our book provides the solutions to those exercises.

C++ Primer Answer Book is intended to be used in conjunction with C++ Primer. We assume that you have read the material in L&L preceding each exercise. We present our solution along with an explanation, but we do not repeat the material found in L&L. Only those concepts and constructs that have already been introduced are used in the solutions.

When the solution involves a complete program, we generally include the entire source code so that each solution stands on its own. All programs have been compiled using Microsoft Visual C++ Version 5.0. In some instances when the compiler did not meet the standard, a workaround was used and an explanation given.

We recommend that you use L&L to learn C++, work the exercises, and study the solutions presented here. We hope C++ Primer Answer Book will aid you in understanding C++ while eliminating the frustration of being stuck without an answer to a problem.

Acknowledgments

Special thanks go to Stan Lippman and Josée Lajoie for having the faith to allow us to write this answer book and for their careful review of the text.

Sean Davey, Steve Edwards, S. Rollins Guild, Cay Horstmann, and Jeffrey Oldham provided many helpful comments on the manuscript.

Clovis thanks George Edmunds, Sam Hsu, Mohammad Ilyas, Mahesh Neelakanta, and Cyril Párkányi for their continued support; Sean Davey for the C++ review, for the LaTeX macros, and for his technical support; Andrew Nathanson for his friendship and software/hardware support; S. Rollins Guild for the C++ review and his friendship; A. Carlos Tondo, Julia Mistrello, and Luiz and Elizabete T. Biavatti for helping our company succeed; and Caren E. Tondo for her love, patience, and sense of humor.

Bruce thanks Andrew Bellezza, Jodi Solomon, and Mary Walstrom for their friendship and encouragement; Zahira Ammarguellat, Luddy Harrison, Sandra Loosemore, and Cotton Seed -- one couldn't ask for better co-workers; and Misty and Buddy for their boundless patience.

Last, but certainly not least, we thank the staff at Addison-Wesley. We are especially grateful to our associate editor, Debbie Lafferty, for her patience and knowing when and how hard to push; the production editor, Maureen Willard, for guiding us through the editing, proofs, and final pages; the production manager, John Fuller, for getting the macros approved and improved early in the process; and the freelancer, Diane Freed, for assisting with the production of this book. We appreciate your kind help.

Clovis L. Tondo
Bruce P. Leung


0201309939P04062001

Author Biography

Clovis L. Tondo is President of T&T TechWorks, Inc., a company that provides technical training in C, C++, and UNIX tools to major corporations and produces books for technical publishers. Dr. Tondo is also author of The C Answer Book and coauthor of eight books on C, device drivers, MAKE, and data structures.

Bruce P. Leung is a software engineer with Connected Components Corporation, where he is part of a small team developing a state-of-the-art C++ compiler. He has been involved with the development of various research and industry compilers for the past twelve years. He has also coauthored a data structures textbook with Dr. Tondo.



0201309939AB04062001

Table of Contents

Foreword vii(2)
Preface ix
1 Getting Started
1(2)
2 A Tour of C++
3(26)
3 The C++ Data Types
29(26)
4 Expressions
55(20)
5 Statements
75(30)
6 Abstract Container Types
105(30)
7 Functions
135(50)
8 Scope and Lifetime
185(12)
9 Overloaded Functions
197(8)
10 Function Templates
205(18)
11 Exception Handling
223(8)
12 The Generic Algorithms
231(14)
13 Classes
245(20)
14 Class Initialization, Assignment, and Destruction
265(22)
15 Overloaded Operators and User-Defined Conversions
287(12)
16 Class Templates
299(22)
17 Class Inheritance and Subtyping
321(40)
18 Multiple and Virtual Inheritance
361(26)
19 Uses of Inheritance in C++
387(10)
20 The iostream Library
397(26)
Index 423

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Excerpts

C++ has proven to be a popular programming language, andC++ Primerhas proven to be just as popular among those wishing to learn the language. Learning a programming language, however, requires more than just reading about the language constructs. You must program, write your own code, and study code written by those who are more experienced with the use of the language.To this end, Lippman and Lajoie (L&L) have provided exercises throughoutC++ Primerto encourage their readers to test their understanding of the material. Our book provides the solutions to those exercises.C++ Primer Answer Bookis intended to be used in conjunction withC++ Primer. We assume that you have read the material in L&L preceding each exercise. We present our solution along with an explanation, but we do not repeat the material found in L&L. Only those concepts and constructs that have already been introduced are used in the solutions.When the solution involves a complete program, we generally include the entire source code so that each solution stands on its own. All programs have been compiled using Microsoft Visual C++ Version 5.0. In some instances when the compiler did not meet the standard, a workaround was used and an explanation given. We recommend that you use L&L to learn C++, work the exercises, and study the solutions presented here. We hopeC++ Primer Answer Bookwill aid you in understanding C++ while eliminating the frustration of being stuck without an answer to a problem. AcknowledgmentsSpecial thanks go to Stan Lippman and Joseacute;e Lajoie for having the faith to allow us to write this answer book and for their careful review of the text.Sean Davey, Steve Edwards, S. Rollins Guild, Cay Horstmann, and Jeffrey Oldham provided many helpful comments on the manuscript.Clovis thanks George Edmunds, Sam Hsu, Mohammad Ilyas, Mahesh Neelakanta, and Cyril Paacute;rkaacute;nyi for their continued support; Sean Davey for the C++ review, for the LaTeX macros, and for his technical support; Andrew Nathanson for his friendship and software/hardware support; S. Rollins Guild for the C++ review and his friendship; A. Carlos Tondo, Julia Mistrello, and Luiz and Elizabete T. Biavatti for helping our company succeed; and Caren E. Tondo for her love, patience, and sense of humor.Bruce thanks Andrew Bellezza, Jodi Solomon, and Mary Walstrom for their friendship and encouragement; Zahira Ammarguellat, Luddy Harrison, Sandra Loosemore, and Cotton Seed -- one couldn't ask for better co-workers; and Misty and Buddy for their boundless patience.Last, but certainly not least, we thank the staff at Addison-Wesley. We are especially grateful to our associate editor, Debbie Lafferty, for her patience and knowing when and how hard to push; the production editor, Maureen Willard, for guiding us through the editing, proofs, and final pages; the production manager, John Fuller, for getting the macros approved and improved early in the process; and the freelancer, Diane Freed, for assisting with the production of this book. We appreciate your kind help. Clovis L. Tondo Bruce P. Leung 0201309939P04062001

Rewards Program