How to Use the AP Classes

with your Compiler


The Metrowerks CodeWarrior Pro has built-in support for the AP classes. When installing, choose "Minimum Installation" and check the "AP Class Project Stationary" box.

The documents provided here describe fairly simple do-it-yourself procedures for using the AP classes and for setting up projects in general.


Before you start using the AP classes, we recommend the following three preliminary steps:

  1. Create a folder (directory), for example c:\apclass and download, copy, or move all five .cpp and five .h files for the AP classes, as well as the bool.h file into that folder. If you are using an older compiler developed for Windows 3.1 or DOS (e.g., Turbo C++ 3.0 or Turbo C++ 4.5) under Windows 95, avoid using long names for folders: limit the names to eight characters.

  2. Examine apstring.h, apstack.h and apqueue.h and make sure that #include "bool.h" directive is not commented out. Examine bool.h and, if your compiler suports the bool data type, then comment out the lines
        typedef int bool;
        const int false = 0;
        const int true = 1;
    
    in it. Otherwise make sure that these lines are not commented out. (Students who use a different compiler at home can use the same files for the AP classes but may need a different version of the bool.h file.)

  3. Create an empty folder (directory) for your projects, for example, c:\mywork. You can copy all the source and data files provided for a particular lab or project or a group of projects into that folder. You may prefer to use different folders for different projects.

Now you have to update the include paths for your compiler and learn how to use projects with the apstring class. Follow the appropriate link:


FAQs about apvector, apstring, etc. | Skylight Publishing Home Page


Skylight Publishing <Revised 12/20/99>
support@skylit.com