Thinking In C++ 2nd Edition, Volume 2 By Bruce Eckel

Thinking In C++ Pdf

Download Free Thinking In C++ 2nd Edition, Volume 2 By Bruce Eckel Pdf

Introduction: Thinking In C++ Pdf

Getting Started With Thinking In C++ Pdf 2nd Edition, Standard C++ not only incorporates all the Standard C libraries, with small additions and changes to support type safety, it also adds libraries of its own. These libraries are far more powerful than those in Standard C; the leverage you get from them is analogous to the leverage you get from changing from C to C++.
This section of the book gives you an in-depth introduction to the most important portions of the Standard C++ library. The most complete and also the most obscure reference to the full libraries is the Standard itself. Somewhat more readable (and yet still a self-described “expert’s guide”) is Bjarne Stroustrup’s 3rd Edition of The C++ Programming Language (Addison-Wesley, 1997).
Another valuable reference is the 3rd edition of C++ Primer, by Lippman & Lajoie. The goal of the chapters in this book that cover the libraries is to provide you with an encyclopedia of descriptions and examples so you’ll have a good starting point for solving any problem that requires the use of the Standard libraries. However, there are some techniques and topics that are used rarely enough that they are not covered here, so if you can’t find it in these chapters you should reach for the other two books; this book is not intended to replace those but rather to complement them. In particular, I hope that after going through the material in the following chapters you’ll have a much easier time understanding those books.
You will notice that this section does not contain exhaustive documentation describing every function and class in the Standard C++ library. I’ve left the full descriptions to others; in particular there particularly good online sources of standard library documentation in HTML format that you can keep resident on your computer and view with a Web browser whenever you need to look something up. This is PJ Plauger’s Dinkumware C/C++ Library reference at http://www.dinkumware.com. You can view this online, and purchase it for local  Chapter 14: Templates & Container Classes viewing. It contains complete reference pages for the both the C and C++ libraries (so it’s good to use for all your Standard C/C++ programming questions). I am particularly fond of electronic documentation not only because you can always have it with you, but also because you can do an electronic search for what you’re seeking.

Thinking In C++ Pdf 2nd Edition Chapters and Sections

Table Of Contents For Thinking In C++ Pdf

Part 1: The Standard C++ Library 23 Library overview

1: Strings

What’s in a string

Creating and initializing C++ strings

Operating on strings

Appending, inserting and concatenating strings

Replacing string characters

Concatenation using non-member overloaded operators

Searching for strings

Finding in reverse

Finding first/last of a set

Removing characters from strings

Comparing strings

Using iterators

Strings and character traits

A string application

Summary

Exercises

 

2: Iostreams

 

Why iostreams?

True wrapping

Iostreams to the rescue

Sneak preview of operator overloading

Inserters and extractors

Common usage

Line-oriented input

File

iostreams

Open modes

Iostream buffering

Using get( ) with a streambuf

Seeking in iostreams

Creating read/write files

stringstreams

strstreams

User-allocated storage

Automatic storage allocation

Output stream formatting

Internal formatting data

An exhaustive example

Formatting manipulators

Manipulators with arguments

Creating manipulators

Effectors

Iostream examples

Code generation

A simple datalogger

Counting editor

Breaking up big files

Summary

Exercises

 

3: Templates in depth

 

Nontype template arguments

Default template arguments

The typename keyword

Typedefing a typename

Using typename instead of class

Function templates

A string conversion system

A memory allocation system

Type induction in function templates

Taking the address of a generated function template

Local classes in templates

Applying a function to an STL sequence

Template-templates

Member function templates

Why virtual member template functions are disallowed

Nested template classes

Template specializations

Full specialization

Partial Specialization

A practical example

Design & efficiency

Preventing template bloat

Explicit instantiation

Explicit specification of template functions

Controlling template instantiation

The inclusion vs. separation models

The export keyword

Template programming idioms

The “curiously-recurring template”

Traits

Summary

 

4: STL Containers & Iterators

 

Containers and iterators

STL reference documentation

The Standard Template Library

The basic concepts

Containers of strings

Inheriting from STL containers

A plethora of iterators

Iterators in reversible containers

Iterator categories

Predefined iterators

Basic sequences: vector, list & deque

Basic sequence operations

vector

Cost of overflowing allocated storage

Inserting and erasing elements

deque

Converting between sequences

Cost of overflowing allocated storage

Checked random-access

list

Special list operations

Swapping all basic sequences

Robustness of lists

Performance comparison

set

Eliminating strtok( )

StreamTokenizer: a more flexible solution

A completely reusable tokenizer

stack

queue

Priority Queues

Holding bits

bitset

vector

Associative containers

Generators and fillers for associative containers

The magic of maps

Multimaps and duplicate keys

Multisets

Combining STL containers

Cleaning up containers of pointers

Creating your own containers

Freely-available STL extensions

Summary

Exercises

 

5: STL Algorithms

 

Function objects

Classification of function objects

Automatic creation of function objects

SGI extensions

A catalog of STL algorithms

Support tools for example creation

Filling & generating

Counting

Manipulating sequences

Searching & replacing

Comparing ranges

Removing elements

Sorting and operations on sorted ranges

Heap operations

Applying an operation to each element in a range

Numeric algorithms

General utilities

Creating your own STL-style algorithms

Summary

Exercises

 

Part 2: Advanced Topics

6: Multiple inheritances

 

Perspective

Duplicate subobjects

Ambiguous upcasting

virtual base classes

The “most derived” class and virtual base initialization

“Tying off” virtual bases with a default constructor

Overhead

Upcasting

Persistence

Avoiding MI

Repairing an interface

Summary

Exercises

 

7: Exception handling

 

Error handling in C

Throwing an exception

Catching an exception

The try block

Exception handlers

The exception specification

Better exception specifications?

Catching any exception

Rethrowing an exception

Uncaught exceptions

Function-level try blocks

Cleaning up

Constructors

Making everything an object

Exception matching

Standard exceptions

Programming with exceptions

When to avoid exceptions

Typical uses of exceptions

Overhead

Summary

Exercises

 

8: Run-time type identification

 

The “Shape” example

What is RTTI?

Two syntaxes for RTTI

Syntax specifics

typeid( ) with built-in types

Producing the proper type name

Nonpolymorphic types

Casting to intermediate levels

void pointers

Using RTTI with templates

References

Exceptions

Multiple inheritances

Sensible uses for RTTI

Revisiting the trash recycler

Mechanism & overhead of RTTI

Creating your own RTTI

Explicit cast syntax

Summary

Exercises

 

9: Building stable systems

 

Shared objects & reference counting

Reference-counted class hierarchies

The canonical object & singly-rooted hierarchies

An extended canonical form

Design by contract

Integrated unit testing

Dynamic aggregation

Exercises

 

10: Design patterns

 

The pattern concept

The singleton

Classifying patterns

Features, idioms, patterns

Basic complexity hiding

Factories: encapsulating object creation

Polymorphic factories

Abstract factories

Virtual constructors

Callbacks

Functor/Command

Strategy

Observer

Multiple dispatching

Visitor, a type of multiple dispatching

Efficiency

Flyweight

The composite

Evolving a design: the trash recycler

Improving the design

“Make more objects”

A pattern for prototyping creation

Abstracting usage

Applying double dispatching

Implementing the double dispatch

Applying the visitor pattern

RTTI considered harmful?

Summary

Exercises

 

11: Tools & topics

 

The code extractor

Debugging

assert( )

Trace macros

Trace file

Abstract base class for debugging

Tracking new/delete & malloc/free

CGI programming in C++

Encoding data for CGI

The CGI parser

Using POST

Handling mailing lists

A general information-extraction CGI program

Parsing the data files

Summary

Exercises

A: Recommended reading

C

General C++

My own list of books

Depth & dark corners

The STL

Design Patterns

Download Now

Note: If you have any question about Download Free Thinking In C++ Pdf Then you can comment it.

Related Posts:


Be the first to comment

Leave a Reply

Your email address will not be published.


*