Using testunit.cpp (and testunit.h) with Microsoft VisualC++6.0

Example: ex1.cpp

1. If necessary, copy the files testunit.h and testunit.cpp to the same directory containing the sample file ex1.cpp.

2. Open the ex1.cpp file and try to build it. (You will get some link errors; ignore them for now.)

At the bottom of the workspace window click on the File tab. You should get something like this:

VisualC++ screen shot after trying to
    build ex1.exe

3. Next, right-click on the bold face ex1 files and select the Add Files to Project:

Right click on ex1 files and select
    Add Files to Project

4. Select the testunit.cpp file.

Select the testunit.cpp file to
    add to the project.

5. Now rebuild the project. It should now contain ex1.cpp, testunit.cpp and the header file testunit.h. It should rebuild with no errors and the workspace should look something like this:

Rebuild the project. It should
    now contain ex1.cpp, testunit.cpp and the header file testunit.h
    and compile with no errors.

6. Running the program will output the test results:

Running the program produces the
    window with the test results.