Click Here!
home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

C++ in Plain English
(Publisher: IDG Books Worldwide, Inc.)
Author(s): Brian Overland
ISBN: 1558284729
Publication Date: 04/01/96

Bookmark It

Search this book:
 
Acknowledgments
Part I—Core Features of C and C++
Chapter 1—Introduction: What C++ Will Do for You
The Origins of C++
Making the Transition from C to C++
Classes: Organization by Objects
Encapsulation: Cure for a Programming Headache
Polymorphism: Decentralized Control
C++ and Strengthened Types
Function Overloading
Operator Overloading
The Plan of this Book
C++: The Future Is Now

Chapter 2—Basic Features of C/C++ Programs
Your First C++ Program
Adding Data Declarations
More About #include
What Can I Do with a Statement?
Assigning Values
Printing Output
Getting Input
Some C++ Quirks
Watch Out for That Semi!
Assignments Are Expressions, Too
Adding Functions to Your Program
General Syntax for Functions
Function Example
Functions in the void
Local, Global, and Other Variables
Local Variables
Global Variables
Static Variables
External Variables
Fun with Control Structures
The if Statement
The while Statement
Impress Your Friends with Fancy C++ Operators
Increment and Decrement Operators
Assignment Operators
Bitwise and Logical Operators

Chapter 3—Pointers, Strings, and Things
A More Efficient Way to Pass Data
Pointers and Passing by Reference
Steps for Passing by Reference
Two Complete Pass-by-Reference Examples
Pointers and Arrays
Array Basics
Loop Processing with Pointers
C++ Strings
Pointers and Dynamic Memory
Using malloc and free (C and C++)
Using now and delete (C++ Only)

Chapter 4—Input, Output, and C++
Going with the Flow: Introduction to Streams
Stream Operators (<< and >>): A First Look
The Joy of Formatting
Line-Based Input with STDIO.H
File Operations with STDIO.H
Files and Stream Operators
The Great Controversy: To Stream or Not to Stream

Part II—Moving from C to C++
Chapter 5—A Touch of Class
Developing Class: A Better String Type
Member Functions: A Class Act
The Deadly Semi: Watch Out for That Syntax!
What’s an Object, Anyway?
Calling a Member Function
Member Functions: A Walk-Through
Pointers to Objects
Reaping the Benefits of Private Data
The Dynamic-Memory Implementation: A Walk-Through
Life and Death of an Object: Constructors et al.
Function Inlining for Fun and Profit
Structures as a Special Case of Classes
Classes in Perspective
Encapsulation
Classes, Objects, and Instantiation
Classes: Reusing and Publishing

Chapter 6—Another Look at Constructors
Overloading: Constructors and More Constructors
A Tale of Two Constructors
Interlude with the Default Constructor
The Copy Constructor and the Reference Operator (&)
References: The Address Operator(&) Used in a New Way
Writing the Copy Constructor
The Finishing Touch: The const Keyword
Other Constructor Examples
How C++ Calls Constructors (Conversion)
Summary: the Key Points of Construction
Overloaded Constructors
The Default Constructor
The Copy Constructor
Initialization and Conversion

Chapter 7—Class Operations (Operator Overloading)
The Basic Syntax
Writing the Addition (+) Operator Function
The Mechanics of Calling an Operator Function
And the Rest... (Other Addkion Functions)
Who Needs Friends?
Writing the Assignment Function
The Assignment Function Definition
The this Pointer and Its Uses
Assignments and the Reference Operator (&)
Writing a Conversion Function
The CStr Class in Summary
Another Class Operator Example
Forging Ahead with Operator Overloading
Using the this Pointer
Naming an Operator Function
Binary Operators
Unary Operators
The Assignment Operator
Assignment from Other Types
Other Assignment Operators (+=, -=, etc.)
Associativity, Prcedence, and Commutativity

Chapter 8—Inheritance: C++ and Good Genes
Return to CStr: A Software Dilemma
Son of CStr (Or Is It “Daughter”?)
Derived Class Syntax
Writing Functions for the New Class
Overriding Functions and Clarifying Scope
Inheritance Hierarchies
Without Inheritance: Doing it the Hard Way
Public, Private, and Protected Access
Another Example: Fast Cars and Inheritance Trees
Base-Class Constructors
Base Classes and Pointers

Chapter 9—Virtual Functions and Why They're Good
Applying the virtual Keyword
When Should You Make a Function Virtual?
Menu Command Example
Declaring and Defining the Base Class
Declaring and Defining the Menu Objects
Using the Objects
The Advantage of Virtual Menu Commands
Functions with No Implementation (Pure Virtual Functions)
How Virtual Functions Are Implemented

Appendix A
Index
[an error occurred while processing this directive]

Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.