The Five Steps - Step 5

Understand the problem

Do a small example by hand

Write an algorithm for solving the problem

Translate the algorithm into a programming language (like C)

Test the program

Before we even complete coding the entire algorithm into C, we can test the program to see if it compiles.

When we compile, we get errors. These are called compile time errors or syntax errors.

stock0.c: In function âmainâ:
stock0.c:20: error: syntax error before âsell_wholeâ
stock0.c:28: error: âportfolio_valueâ undeclared (first use in this function)
stock0.c:28: error: (Each undeclared identifier is reported only once
stock0.c:28: error: for each function it appears in.)

What went wrong?


[up] to Overview.