PDF Archive

Easily share your PDF documents with your contacts, on the Web and Social Networks.

Share a file Manage my documents Convert Recover PDF Search Help Contact



Thinking in C++.pdf


Preview of PDF document thinking-in-c.pdf

Page 1 2341104

Text preview


What’s inside...
Thinking in C++ 2nd edition VERSION
TICA17Error! Bookmark not defined.

Why C++ succeeds ........................37

PrefaceError! Bookmark not
defined.
PrerequisitesError! Bookmark not defined.
Thinking in CError! Bookmark not defined.

Learning C++Error! Bookmark not defined.
Goals Error! Bookmark not defined.
ChaptersError! Bookmark not defined.
ExercisesError! Bookmark not defined.
Source codeError! Bookmark not defined.

A better C......................................38
You’re already on the learning curve 38
Efficiency......................................38
Systems are easier to express and
understand.....................................39
Maximal leverage with libraries.......39
Source-code reuse with templates ....39
Error handling................................39
Programming in the large ................40

Strategies for transition .................40
Guidelines .....................................40
Management obstacles....................42

Summary ..........................................43

Coding standardsError! Bookmark not defined.

2: Making & using objects 45

Language standardsError! Bookmark not defined.
Language support Error! Bookmark not defined.
The process of language translation45
Seminars & CD Roms Error! Bookmark not defined.Interpreters....................................46
ErrorsError! Bookmark not defined.
Compilers......................................46
AcknowledgementsError! Bookmark not defined. The compilation process .................47
Tools for separate compilation.....48

1: Introduction to objects

11

The progress of abstraction..........11
An object has an interface ............13
The hidden implementation..........15
Reusing the implementation .......16
Inheritance: reusing the interface17
Is-a vs. is-like-a relationships.......... 21

Interchangeable objects with
polymorphism.................................22
Creating and destroying objects ..25
Exception handling: dealing with
errors ................................................26
Analysis and design.......................27
Phase 0: Make a plan...................... 29
Phase 1: What are we making? ........ 30
Phase 2: How will we build it?........ 32
Phase 3: Build it ............................ 35
Phase 4: Iteration........................... 35
Plans pay off ................................. 37

Declarations vs. definitions.............49
Linking.........................................53
Using libraries ...............................54

Your first C++ program.................55
Using the iostreams class ................55
Namespaces...................................56
Fundamentals of program structure ..57
"Hello, world!" ..............................58
Running the compiler .....................59

More about iostreams ....................59
Character array concatenation..........60
Reading input ................................60
Simple file manipulation .................61

Introducing strings ........................62
Reading and writing files ..............64
Introducing vector..........................66
Summary ..........................................69
Exercises..........................................70