Presentation is loading. Please wait.

Presentation is loading. Please wait.

How to Use The Borland C++ Compiler Version 5

Similar presentations


Presentation on theme: "How to Use The Borland C++ Compiler Version 5"— Presentation transcript:

1 How to Use The Borland C++ Compiler Version 5
How to Use The Borland C++ Compiler Version 5.02 to create C++ and C programs annedawson.com

2 Start up the Borland software
Double click on the Borland C++ icon on the desktop: If the icon is not on the desktop, click on the Start button and select Programs from the list of options. From the programs list, click on Borland C then Borland C++. 23/07/1438

3 23/07/1438

4 You should then see the following screen
You should then see the following screen. Don’t worry if the screen is not exactly like yours – but it should have the Borland C++ icon and title in the top left corner. 23/07/1438

5 Create a new project From the Borland C++ main screen, click on File then New then Project to get to the New Target window: 23/07/1438

6 Now click on the Advanced button
In the Project Path and Name: text box, type:   c:\temp\myprogs\prog1.ide   Notice that the Target Name is automatically taken from what you type. In the Target Type: text box click on Application[.exe] to highlight it. In the Platform: text box select Win32. In the Target Model: text box select Console. The remaining settings are as shown in the New Target window above and are not changed Now click on the Advanced button 23/07/1438

7 Now click on the OK button of the Advanced Options window.
Click in the .def and .rc boxes to deselect them so that the Advanced Options window looks like this: Now click on the OK button of the Advanced Options window. Then click on the OK button of the New Target window to complete the setup for the new project. You will then see the Project window… 23/07/1438

8 The project is called prog1. The project file is prog1
The project is called prog1. The project file is prog1.ide in the c:\temp\myprogs directory. Within this project is a C++ (or C) file : prog1.cpp (or prog1.c). This is the source code file, the one that contains the text of the C++ or C program. prog1.exe is the name of the executable file to be generated from prog1.cpp (or prog1.c). Now click on the filename prog1.cpp ( or prog1.c) to highlight it, and press the Enter key to open the file. You will see a code window for C:\temp\cpp\prog1.cpp (or prog1.c). The code window is where you to enter the text of your program. 23/07/1438

9 23/07/1438

10 Save the project In the title bar of the code window, there is a * after the source code file name. This means that the file has yet to be saved. To save the file, Click on File then Save. 23/07/1438

11 or 23/07/1438

12 Compile the project To compile your source code (convert it to machine code) click on Project, and then Compile. If you have typed everything in correctly, you should see the following window (or a similar window for prog1.c). or 23/07/1438

13 Click on OK. If there are any errors reported in this window, the program will not be compiled to machine code. You will need to find and correct the error, then compile again. 23/07/1438

14 Run (execute) project Once you have 0 errors, you then have code which will run, once it is linked to the necessary library files. To compile, link and run a program which you know has zero errors, you can simply click on the lightening bolt button in the tool bar (the sixth button from the left which has a yellow wavy line on it). or 23/07/1438

15 You will see the following window…
23/07/1438


Download ppt "How to Use The Borland C++ Compiler Version 5"

Similar presentations


Ads by Google