Certificates
Free Newsletter
What's New
Contact
Search Site
Certificates
Class Schedule
Contact Us
Course Areas
-Oracle Applications
-Data Warehouse Technologies
-Storage Management
-XML Technologies
Courses
-Advanced SQL Techniques
-Designing XML Schemas
-Disaster Recovery Planning
-Intensive XSLT Programming
-Designing the Data Warehouse
-Oracle 11i: System Administration
-Oracle Workflow 2.5
-Relation Database Concepts
-SAN & NAS Implementation
-XML: Comprehensive Intro
-XML & Java
Free Newsletter
Home
Our Customers
Our Instructors
Registration
Technology Library
-Articles
-Recommended Reading
-Tips, Techniques & FAQ's
-White Papers
Tuition Discounts
Why Object & Data Labs?
Onsite Training
Courses
Class Schedule
Registration
Tuition Discounts
Technology Library
Our Instructors
Our Customers
Why Object & Data Labs?
Hot New Courses:
XML: A Comprehensive Introduction
Disaster Recovery Planning
How students
rate us
Free Newsletter
Visit our technology library and sign up to receive the latest word in technology from industry specialist.
Certification Available
Visit our certification page to see how you can be on the fast track to certification in advanced technologies.
Home
>
Courses
>
Course Descriptions
C++ Programming
Course Outline
Transitioning from C to C++
C vs. C++
How does the compiler recognize a C++ program?
How does the preprocessor know the environment?
A new style of commenting
Never assume! (The implicit use of type int)
The default return value from main()
The difference between a declaration and definition
Formal argument names in function declarations
Formal argument names in function definitions
All functions must be declared before being called
The meaning of empty parentheses
Default function arguments
The difference between initialization and assignment (and why it's important)
Where to place your variable declarations
Variable declarations inside a for loop
The tag name becomes the type name
How enumerated types in C++ differ from C
Initialization of global variables
Array initialization
The Boolean type bool
void * pointers
Use 0, not the macro NULL
The const keyword
What it means to return arguments from a function by const-value
New styles of casting
Namespaces
How to create a namespace
The scope resolution operator
Accessing namespace members directly
Using declarations
Using directives
Be careful to avoid ambiguous situations
Unnamed namespaces
Namespace aliases
The Koenig lookup rule
Input/Output Basics
Introduction
Why switch to something new?
Header file naming conventions
The iostream header file
The instance cout
The insertion operator
Explicitly ualifying the cout object
Accessing the cout object with a using declaration
Accessing the cout object with a using directive
A suggestion for proper usage of the std namespace
Be aware of operator precedence
Formatting the output
The instance cin
The extraction operator
Checking for end-of-file
Chapter 4 / Reference Variables
Definition
What's the problem?
How to create a reference variable
All references must be initialized
So what's the point of all this work?
const-ualifying a reference
When not to use a reference
There is no "constant reference"
Creating a reference to a pointer
Making a reference to an array
Returning a reference from a function
Dynamic Memory Allocation
How to allocate dynamic memory for a single object
How to initialize a primitive type
The meaning of empty parentheses
How to release the free space for a single object
Deleting a zero-based pointer
How to allocate free space for an array of objects
Sorry, no initialization of an array is possible
How to release the free store for an array of objects
Keep things in balance
Using new and delete to store strings on the free store
How to allocate and delete multidimensional arrays
Name that space!
Do you understand?
Introduction to Classes
Background
Thinking about structures
Global functions to the rescue
The problem with C
A first look at encapsulation
The revised Circle abstraction
You must support constant objects
A structure vs. a class
The purpose of a class
What's in a class?
How to write a class definition
Class declaration vs. class definition
When to use a class declaration
When to use a class definition
What about the input/output classes?
Principle of data hiding
Working through the public interface
Access specifiers
Choose your coding style
Modularity and implementation hiding
How to do it
What the user now does
In summary...
How to access class members via instances
Inline functions
What is an inline function?
How an inline function compares to a macro
Make inline functions available to the compiler
Where inline functions are placed
Linkage of inline functions
How to write a global inline function
How to write a class member inline function
Implicit inlining
Explicit inlining
Implicit or explicit inlining?
mutable keyword
How to display the contents of a class
The Model/View/Controller pattern
Enumerated types within classes
Why use an enumeration?
A private enumeration
A public enumeration
The "enum hack"
Constructors and Destructors
Background
Constructor definition
Syntax rules
When a constructor is not invoked
The compiler-supplied default constructor
The default constructor: a general definition
Initializing constant objects
Constructor overloading
A constructor cannot be called directly
Destructor definition
The compiler-supplied destructor
What the destructor does
Writing your own destructor
Syntax rules
How to instantiate a class and invoke the default constructor
How to instantiate a class and pass arguments to the constructor
Where to go wrong
How to prevent instantiations with the default constructor
Implicit type conversion
How to suppress implicit type conversion
Copy constructor
Default copy constructor
Syntax of the copy constructor
How many copy constructors are there?
Shallow vs. deep copy
Writing your own copy constructor
How to suppress the copying of objects
Function style cast
Initialization vs. assignment
Base/member initialization list
Default initialization
Mandatory use of the base/member initialization list
Another case calling for initialization
What about pointers?
Formal argument names vs. class member names
Order of initialization
A primitive type array as a nonstatic data member
An array of user-defined types as a nonstatic data member
How to create an array of user-defined instances
An array of constant data members
How to create a single user-defined type on the free store
How to create an array of a user-defined type on the free store
Placement syntax when calling new
More Class Features
The this pointer
Dereferencing the this pointer to make a copy of the invoking object
Dereferencing the this pointer to allow function chaining
Static class data members
Initializing static class data members within the class definition
Static member functions
A random number generator class
A class to "die" for
A Dice class
The size of a class
Friend functions
How a class grants friendship to a function
Member vs. non-member functions
If you really don't like having friends...
Friend declarations for classes in a namespace
Friend classes
Encapsulating a class
Operator conversion functions
Introduction to pointers to class members
Exception Handling
How to throw an exception
How to catch an exception
How it works
Matching process for catch blocks
A simple example of exception handling
Unwinding the stack
What if the call to new fails?
How to prevent new from throwing an exception
Propagating an exception
How to manage pointers to the free space
You can't destroy what you haven't created
Re-throwing an object
Catching throws from subobject members
Function-try-blocks
Mixing subobject members and pointers
Partial construction of an object
Writing exception-safe code
Destructors and exception handling
Exception specifications
Exception specification violations
Error Conditions
How the compiler treats exception specifications
Defining operator new() for a class
Function Overloading
Some examples of overloading
The return type is ignored
const-ualifying an argument passed by value
const-ualifying an argument passed by pointer
const-ualifying an argument passed by reference
Mutator vs. constant member functions
Rules of overload resolution
The rules of overload resolution
Overloading on a pointer type
Name mangling
How to avoid name mangling
Type-safe linkage
Operator function overloading
Inherently supplied operators
Overload the family of operators
Assignment operator
Checking for self-assignment
Function call operator
Subscript operator
Indirect member operator
Compound assignment operators
Increment and decrement operators
Overloading the comma operator
Overloading logical AND and OR
Overloading the insertion operator
Summary
Inheritance
What it looks like in memory
Using inheritance to create an is-a relationship
How to define a derived class
A structure vs. a class (revisited)
The keyword protected
Access privileges
Base class "accessor" functions
Changing the inherited access
Private or public inheritance?
Function hiding
How a derived class member function calls a base class member function
Manager functions are not inherited
How to write the manager functions
Derived-to-base standard conversion
Hiding non-member functions
Don't use an upcast with arrays
Introduction to polymorphism
Polymorphism to the rescue
Polymorphism and virtual functions
Programmer friendly vs. programmer hostile code
Overriding a virtual function
Virtual destructor
Trying to invoke a virtual function from a base class constructor
Abstract base classes
The loan example (revisited)
Exception specifications with virtual functions
Liskov Substitution Principle
Multiple inheritance
Virtual base classes
Initializing a virtual base class
Templates
The justification for function templates
Why not use a macro?
How to write a function template
Optimizing the code
Where do function templates go?
Instantiating with different types
Explicitly specifying the type
Default function arguments
Fully specializing a function template
How a specialized function gets called
Specialize or overload?
Class templates
How to define a class template
Defining members outside the class definition
Instantiating a class template
Template instantiation of another template
Default template arguments
Granting friendship to a class from a class template
Granting friendship to a function from a class template
Granting friendship to a non-template function
Runtime Type Information
typeid keyword
Iostream Output
The instances std::cerr and std::clog
Formatting the output
Bit format flags
How to turn the bit format flags on
How to display integers in the proper base
How to show the base setting of integers
How to display the sign of an integer
How to display output in uppercase
How to display a character
The member function ostream::put()
How to set the output field width
How to specify the fill character
How to specify field justification
How to format floating-point numbers
How to display a bool type
How to print an address
Taking the address of a string literal
How to output to a memory buffer
The member function ostream::flush()
Mixing the predefined stdio and iostream streams
Iostream Input
How to check for errors
Error reporting flags
Testing the iostream object directly
The member function std::basic_ios::clear()
How to flush the input stream buffer
Character input
String literal input using the extraction operator
Limiting the number of input characters
String input using std::istream::getline()
Manipulators
The format of a manipulator
Some simple manipulators
Built-in manipulators called with no arguments
Manipulators taking one argument
Built-in manipulators taking one argument
Back to Course Description
Class Schedule
Registration
Home
|
Courses
|
Class Schedule
|
Registration
|
About Us
|
Contact
Call us TOLL FREE at 1-888-230-9052
Copyright 2003-2012, Object & Data Labs
All Object & Data Labs Courses are certified courses with UC Berkeley & UCSC extension
Website by
Howard Pugh Web Design
Website maintained by
Ann T. Comey