Chapter - 1

What is C++

History of C++

B.C.	Early languages such as FORTRAN, COBOL, ALGOL, PL/I and others.

1970	Brian Kernigham and Dennis Ritchie invent C. The language they used for inspiration was called “B”

1980	Bjarne Stroustrup creates “C with Classes.”

1995	The ANSI Committee releases their draft of the C++ Standard.

1998	An official C++ standard is adopted.

(This is the day that C++ started to become obsolete.)

How C++ Works

Programs are written by humans.

Programs are run on computers.

C++ programs are written by humans and translates into machine language by the C++ compiler.

C++ View of the World

Traditional programming languages view of the world (computer):

Data

Code

C++ adds:

Class

(data and the instructions that operate them).

How to write a program

Good organization is key to writing good programs

Steps to writing a program:

Step 1. Think! (This is not optional.)

Step 2. Organize your thoughts

Step 3. Write them down in English

Step 4. Translate them into C++

How to learn to Program

Write Programs:

There is no better teacher than experience.

Working till 2:00 in the morning on a program only to find that you typed "==" instead of "=" is a great learning experience.

Comment.

Always comment your programs, even if you are writing them for yourself.

Comments help you organize your thoughts.

Comments help you remember what you did.

Comments help the programmer who comes after you understand what you did.

2002-09-29T15:59:48