An example is given in example.cpp. This gives a simple linear regression example using four different algorithms. The correct output is given in example.txt. The program carries out a rough check that no memory is left allocated on the heap when it terminates. See the section on testing for a comment on the reliability of this check and the use of the DO_FREE_CHECK option.
I include a variety of make files. Use a command like
gmake example -f gnu.mak (Gnu G++) gmake example -f cc.mak (AT&T, HPUX, Sun) nmake example -f ms_nt.mak (Microsoft C++ 8.0) make -f ex_b.mak (Borland C++ 3.1) make -f ex_bc45.mak (Borland C++ 4.5) wmake example.exe -f watcom.mak (Watcom C++ 10A) wmake example.exe -f watco_nt.mak (Watcom C++ 10A)The Borland files were derived from the project file and you will have to edit these to suit your environment. The file ex_bc45.mak is for making a windows NT executable program. The Microsoft file is for the version of C++ that came with the Windows NT 3.1 development kit. The second Watcom file is for making a Windows NT executable.