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.

9780201703535

Accelerated C++ Practical Programming by Example

by ;
  • ISBN13:

    9780201703535

  • ISBN10:

    020170353X

  • Edition: 1st
  • Format: Paperback
  • Copyright: 2000-08-14
  • Publisher: Addison-Wesley Professional

Note: Supplemental materials are not guaranteed with Rental or Used book purchases.

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: $49.99 Save up to $20.00
  • Rent Book $29.99
    Add to Cart Free Shipping Icon Free Shipping

    TERM
    PRICE
    DUE
    USUALLY SHIPS IN 24-48 HOURS
    *This item is part of an exclusive publisher rental program and requires an additional convenience fee. This fee will be reflected in the shopping cart.

Supplemental Materials

What is included with this book?

Summary

Want to learn how to program in C++ immediately? Want to start writing better, more powerful C++ programs today? Accelerated C++'s uniquely modern approach will help you learn faster and more fluently than you ever believed possible. Based on the authors' intensive summer C++ courses at Stanford University, Accelerated C++ covers virtually every concept that most professional C++ programmers will ever use -- but it turns the "traditional" C++ curriculum upside down, starting with the high-level C++ data structures and algorithms that let you write robust programs immediately. Once you're getting results, Accelerated C++ takes you "under the hood," introducing complex language features such as memory management in context, and explaining exactly how and when to use them. From start to finish, the book concentrates on solving problems, rather than learning language and library features for their own sake. The result: You'll be writing real-world programs in no time -- and outstanding code faster than you ever imagined.

Author Biography

Andrew Koenig is a member of the Large-Scale Programming Research Department at AT&T's Shannon Laboratory, and the Project Editor of the C++ standards committee. A programmer for more than 30 years, 15 of them in C++, he has published more than 150 articles about C++, and speaks on the topic worldwide.

Barbara E. Moo is an independent consultant with 20 years' experience in the software field. During her nearly 15 years at AT&T, she worked on one of the first commercial products ever written in C++, managed the company's first C++ compiler project, and directed the development of AT&T's award-winning WorldNet Internet service business.



0

Table of Contents

Preface xi
Getting started
1(8)
Comments
1(1)
#include
2(1)
The main function
2(1)
Curly braces
2(1)
Using the standard library for output
3(1)
The return statement
3(1)
A slightly deeper look
4(1)
Details
5(4)
Working with strings
9(8)
Input
9(2)
Framing a name
11(3)
Details
14(3)
Looping and counting
17(18)
The problem
17(1)
Overall structure
18(1)
Writing an unknown number of rows
18(4)
Writing a row
22(5)
The complete framing program
27(3)
Counting
30(1)
Details
31(4)
Working with batches of data
35(16)
Computing student grades
35(6)
Using medians instead of averages
41(7)
Details
48(3)
Organizing programs and data
51(24)
Organizing computations
51(10)
Organizing data
61(5)
Putting it all together
66(2)
Partitioning the grading program
68(2)
The revised grading program
70(1)
Details
71(4)
Using sequential containers and analyzing strings
75(26)
Separating students into categories
75(4)
Iterators
79(3)
Using iterators instead of indices
82(2)
Rethinking our data structure for better performance
84(1)
The list type
85(2)
Taking strings apart
87(3)
Testing our split function
90(1)
Putting strings together
91(5)
Details
96(5)
Using library algorithms
101(22)
Analyzing strings
101(9)
Comparing grading schemes
110(6)
Classifying students, revisited
116(4)
Algorithms, containers, and iterators
120(1)
Details
121(2)
Using associative containers
123(16)
Containers that support efficient look-up
123(1)
Counting words
124(2)
Generating a cross-reference table
126(3)
Generating sentences
129(7)
A note on performance
136(1)
Details
137(2)
Writing generic functions
139(16)
What is a generic function?
139(4)
Data-structure independence
143(7)
Input and output iterators
150(2)
Using iterators for flexibility
152(1)
Details
153(2)
Defining new types
155(14)
Student__info revisited
155(1)
Class types
156(4)
Protection
160(3)
The Student__info class
163(1)
Constructors
164(2)
Using the Student__info class
166(1)
Details
167(2)
Managing memory and low-level data structures
169(18)
Pointers and arrays
169(7)
String literals revisited
176(1)
Initializing arrays of character pointers
177(2)
Arguments to main
179(1)
Reading and writing files
180(2)
Three kinds of memory management
182(3)
Details
185(2)
Defining abstract data types
187(24)
The Vec class
187(1)
Implementing the Vec class
188(7)
Copy control
195(7)
Dynamic Vecs
202(1)
Flexible memory management
203(6)
Details
209(2)
Making class objects act like values
211(16)
A simple string class
212(1)
Automatic conversions
213(1)
Str operations
214(7)
Some conversions are hazardous
221(1)
Conversion operators
222(1)
Conversions and memory management
223(2)
Details
225(2)
Using inheritance and dynamic binding
227(26)
Inheritance
227(5)
Polymorphism and virtual functions
232(5)
Using inheritance to solve our problem
237(6)
A simple handle class
243(4)
Using the handle class
247(1)
Subtleties
248(2)
Details
250(3)
Managing memory (almost) automatically
253(16)
Handles that copy their objects
254(5)
Reference-counted handles
259(4)
Handles that let you decide when to share data
263(1)
An improvement on controllable handles
264(4)
Details
268(1)
Revisiting character pictures
269(22)
Design
269(9)
Implementation
278(10)
Details
288(3)
Where do we go from here?
291(4)
Use the abstractions you have
291(2)
Learn more
293(2)
Appendix A Language details 295(16)
A.1 Declarations
295(4)
A.2 Types
299(6)
A.3 Expressions
305(3)
A.4 Statements
308(3)
Appendix B Library summary 311(14)
B.1 Input--output
311(3)
B.2 Containers and iterators
314(7)
B.3 Algorithms
321(4)
Index 325

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

A new approach to C++ programming We assume that you want to learn quickly how to write useful C++ programs. Therefore, we start by explaining the most useful parts of C++. This strategy may seem obvious when we put it that way, but it has the radical implication that we do not begin by teaching C, even though C++ builds on C. Instead, we use high-level data structures from the start, explaining only later the foundations on which those data structures rest. This approach lets you to begin writing idiomatic C++ programs immediately.Our approach is unusual in another way: We concentrate on solving problems, rather than on exploring language and library features. We explain the features, of course, but we do so in order to support the programs, rather than using the programs as an excuse to demonstrate the features. Because this book teaches C++ programming, not just features, it is particularly useful for readers who already know some C++, and who want to use the language in a more natural, effective style. Too often, people new to C++ learn the language mechanics without learning how to apply the language to everyday problems. Our approach works--for beginners and experienced programmers We used to teach a week-long intensive C++ course every summer at Stanford University. We originally adopted a traditional approach to that course: Assuming that the students already knew C, we started by showing them how to define classes, and then moved systematically through the rest of the language. We found that our students would be confused and frustrated for about two days--until they had learned enough that they could start writing useful programs. Once they got to that point, they learned quickly. When we got our hands on a C++ implementation that supported enough of what was then the brand-new standard library, we overhauled the course. The new course used the library right from the beginning, concentrated on writing useful programs, and went into details only after the students had learned enough to use those details productively. The results were dramatic: After one day in the classroom, our students were able to write programs that had taken them most of the week in the old course. Moreover, their frustration vanished. Abstraction Our approach is possible only because C++, and our understanding of it, has had time to mature. That maturity has let us ignore many of the low-level ideas that were the mainstay of earlier C++ programs and programmers. The ability to ignore details is characteristic of maturing technologies. For example, early automobiles broke down so often that every driver had to be an amateur mechanic. It would have been foolhardy to go for a drive without knowing how to get back home even if something went wrong. Today's drivers don't need detailed engineering knowledge in order to use a car for transportation. They may wish to learn the engineering details for other reasons, but that's another story entirely. We define abstraction as selective ignorance--concentrating on the ideas that are relevant to the task at hand, and ignoring everything else--and we think that it is the most important idea in modern programming. The key to writing a successful program is knowing which parts of the problem to take into account, and which parts to ignore. Every programming langauge offers tools for creating useful abstractions, and every successful programmer knows how to use those tools. We think abstractions are so useful that we've filled this book with them. Of course, we don't usually call them abstractions directly, because they come

Rewards Program