New Instructions for Using Borland and the Program Design package:

  • Step 1. Create a regular .cpp text file using the normal conventions.
  • Step 2. When writing programs based on windows, use int ApiMain() Instead of int main(). Also make it a point to include all the necessary header files, for example string.h and rect.h. For all other programs use int main()
  • Step 3. This is a very important step. Instead of building a new project, you use a built-in project. Go to Project menu in Borland and click on "Open Project". Then open the project lawnbc502.ide. The path is p:\c++programdesign\chapo3\lawn\lawnbc502.ide. The project has "prog 3-5.cpp" as a default node. This is the lawn program. By simply clicking on the run icon, you could run the lawn program.
  • Step 4. You will be using the same project to run all programs. When you want to run any another program, delete the prog3-5.cpp node and add your own .cpp file, to this project. (Be careful not to delete the other node, \..\ezwin\lib\ezwinbc502.lib). The deleting and adding of nodes is the same procedure you have been following.
  • Step 5. Before running the program, you have to set the Options in Project. To do this, go to the Options menu in Borland and click on Project. Select "Directories" from the Topics list (It is usually selected as default. If not, click on Directories). In that window, you should set the necessary options. The source directories should look like this: Include: p:\bc52\include;$env(EZWINBC502)\include;..\..\ezwin\include. Lib: p:\bc52\lib;$env(EZWINBC502)\lib. You have to add p:\bc52\include for the Include directory and p:\bc52\lib for the Lib directory. The rest of the arguments are there by default. Be careful not to erase anything while typing the above 2 paths. (In a few days, this may not be necessary).
  • Step 6. The output directory has 2 entries, Intermediate and Final. Both will be blank. Type c:\user in both of them and click OK.
  • Step 7. Run the program.