[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
TurboCppHelloWorld
Click on Directories from the Options menu. If you have installed Turbo C++ in C:\TC specify the following:
Save your settings by selecting Options -> Save.
This should get you started with woking in the IDE.
If you have come clean, you are good to run the program. To run the program press Ctrl+F9 or click on Run from the Run menu.
You should get the output as shown below:
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
TurboCppHelloWorld
Turbo C++ Hello World program
General Information
The Turbo C++ IDE (aka Turbo C++ 3.0) is a developer environment created by Borland Corp in 1992 to enable programmers to write C/C++ programs. Turbo C++ (version 3.0) first came as an MS-DOS compiler, supporting C++ templates, object oriented programming, generation of DOS & protected mode executables, as well as generation of code targeting specific legacy CPUs, such as Intel 80186.Working in Turbo C++ 3.0
The main aim behind this section is to give you an idea about how to use the Turbo C++ IDE for creating a simple program, (a "Hello World" program)Configuring the Turbo C++ IDE
Before you start with writing programs you have to tell the IDE where the following files are located:- the include Directories ( or header files) - files that contain your standard include files (usually files that end with .h)
- the library directories - Turbo C++ startup object files and run-time library files (.lib files)
- the output directories - to store your .obj, .exe, and .map files
Click on Directories from the Options menu. If you have installed Turbo C++ in C:\TC specify the following:
- "C:\TC\INCLUDE" - for Include Directories box
- "C:\TC\LIB" - for the Library Directories box
- "C:\TC\BIN" - for the Output Directory
Save your settings by selecting Options -> Save.
This should get you started with woking in the IDE.
Making the program
Once you have started the application, you might see an empty workspace. To start a new program click on File|New. You will have a default empty file named NONAME00.CPP loaded. Type the following lines of code://Hello.cpp //Written in Turbo C++ compiler version 3.0Now you need to compile the program. It is a good practice to save the file before you compile it or run it. Either press F2 to save or click on the Save option from the file menu and simply specify a name for your file. (Here it is saved as hello.cpp). Press Alt+F9 to compile or select Compile from the Compile menu. If there were errors in your program it will immediately display the number of errors in the next window. If there were no errors then your program has compiled successfully. Sometimes the compilation may not come as clean as you think. If you are using Turbo C++ for the first time you have to configure your IDE; provide realtive paths to libraries, or header files, etc.int main() { cout<<"Hello World"; }
- include<iostream.h>
If you have come clean, you are good to run the program. To run the program press Ctrl+F9 or click on Run from the Run menu.
You should get the output as shown below:
Hello World
'Hello World' links
- C
- C++
- C++ Builder, console
- C++ Builder, VCL
- C++ Builder, CLX
- C++ BuilderX, console
- C++ BuilderX, Win32 API
- C#
- PHP
- Prolog
- Visual Prolog
- Win32 API
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
