Sams Teach Yourself C++ in 21 Days

(singke) #1

The Development Cycle ........................................................................................


If every program worked the first time you tried it, this would be the complete develop-
ment cycle: Write the program, compile the source code, link the program, and run it.
Unfortunately, almost every program, no matter how trivial, can and will have errors.
Some errors cause the compile to fail, some cause the link to fail, and some show up
only when you run the program (these are often called “bugs”).
Whatever type of error you find, you must fix it, and that involves editing your source
code, recompiling and relinking, and then rerunning the program. This cycle is repre-
sented in Figure 1.1, which diagrams the steps in the development cycle.

16 Day 1


FIGURE1.1
The steps in the
development of a
C++ program.

Start

Edit
Source
Code

Compile

Compile
Errors

Link

Link
Errors
?

Run
Program

Run-
Time
Errors
?

Ye s

Ye s

Ye s

No

No

No
Done
Free download pdf