|
C++ is an enhanced version of the C language. C++ includes everything
that is part of C and adds support for object-oriented programming (OOP).
In addition, C++ also contains many improvements and features that make
it a "better C", independent of object oriented programming.
C++ is actually an extendible language since we can define new types in
such a way that they act just like the predefined types which are part
of the standard language.
If you just use C++ as a better C, you will not be using all of its power.
Like any quality tool, C++ must be used the way it was designed to be
used to exploit its richness. Some of the new features include encapsulation,
inline function calls, overloading operators, inheritance and polymorphism.
I am not going to explain what they mean here as that would simply take
me away from my purpose here, but you can refer to any good C++ book or
the C++ FAQ for more information.
In this tutorial, Professor Arthur Lee will explain the environment
of C++, then guide you into writing equations, creating functions and
output, looping, and much more. To start learning about C++ now, click
on the subject of your choice below.
The links below are free
C++ tutorials. The entire contents may be purchased either on CD or watched
via the Online University
Intro to C++ & the Environment
Intro to C/C++
The C++ Environment
Completing the Sample Program
Compiling & Executing Programs
Common errors
Saving & Exiting; other errors
Variables,Constants, & Math Statements
Variables
Data Types
Declaration statements & Initializing variables
Declaring Constants
Assignment Statements vs. Prompting for user input
The String Data Type; Equations
Character vs. String data
Using the getline function and the strcpy function
Writing equations and Type casting
Putting it all Together: Demo of complete program
Debugging Demo
Programmer-Defined Functions
Creating Programmer-Defined Functions
Details of Function prototypes, definition and the calling statement
Scope & Lifetime issues; Passing data with functions
Passing Variables by Value and by Reference
Functions that Return Values
Debugging Demo
Creating Output (formatting and creating files)
Stream Manipulators (formatting output)
The Output File Stream: Accessing the Output File
Demo Program (Demo 12) to Illustrate
Debugging Demo
Using the if Statement
Syntax of a Conditional Statement
Relational Operators
Executing if Logic (one statement vs. block)
Assignment Operator vs. Equality Operator
Logical Operators (symbols for: and, or, not)
Other Functions; Nested if Statements
Converting to Upper/Lower Case
Comparing Strings (strcmp and stricmp functions)
The Strlen Function
Nested if Statement Structure
Demo of Complete Program
Looping
Overview of the Looping Structures
Demo of the While Loop
Demo of the Do-While Loop
Demo of the For Loop
Counters and Accumulators in Loops
Demo of Complete Program
Increment/Decrement Operator (what does "C++" mean?)*
|