CIS 22 - Data Structures:
How to create a
project using
Borland C++ for
DOS.
-
The purpose of creating a project file
in Borland C++ is to create a file which takes care of compilation of a
program that involves several source modules (.cpp files).
-
To create a project in Borland C++
for DOS :
1. Go to the PROJECT
option in main menu.
2. Select Open
Project / Create Project and create
a file with .prj extention.
3. Select Add
Item and add all the modules to
the project.
4. Select
Build All in Compile
menu in order to compile .prj file with
all the .cpp files included.
5. Select Run
to run .exe file created as the result of compilation of .prj file.
-
Here is an example:
Suppose you have following files:
min_val.cpp
(contains the definition of function
find_min)
max_val.cpp
(contains the definition of function
find_max)
max_val.h
(contains prototype of function find_max and
is included in "max_val.cpp")
min_val.h
(contains prototype of function find_max and
is included in "min_val.cpp")
min_max.cpp
(contains main() function that includes
"min_val.h" and "max_val.h" )
To create a project:
1. Create a project and name the
file assignm.prj
2. Add as items
min_val.cpp ,
max_val.cpp, and
min_max.cpp files.
3. Go to Compile and select
Build All.
If there
are some errors, the compiler will let you know in where the errors are.
4. In case of successful compilation,
select Run to run assignm.exe
Sanam Dadsheva
Back to CIS 22 home page