Posts tagged ‘Turbo C’

March 8, 2012

How to work with Turbo C++ 3.0 on Windows 7 & implement the built-in functions of graphics.h in your C program?

Many of you might be having trouble working with Turbo C++ 3.0 on Windows 7 & using the functions of graphics.h of C. This article is dedicated to all those who are facing same problem.

1) Download the TURBO C++ 3.0 software from –

2) Unzip it.

3) Browse into the folder & double-click “install”. The software will get installed inside “C:\TC\” directory by default.

4) After successful installation, move inside the directory “C:\TC\BIN\” & launch it by double-clicking on “TC”.

5) From the “Options” menu, select “Linker”. Click on “Libraries”. Click on “Graphics Libraries” if it is unchecked otherwise, leave it.

5) Download DOSBOX from –

6) Move into the DOSBOX installation directory. “C:\Program Files\DOSBox-0.74\” is the path for default installation. Also, you are required to copy the extracted folder “turboc” & paste it inside this directory. Rename this as “TC”.

7) Open & edit the batch file “DOSBox 0.74 Options” using notepad & append the following four lines for auto-mount –

mount d c:\tc\
cd bin

8) Save it. Now, you are almost done. The only thing left is to change the path of the library files.

9) Launch TC again. Click “Options” -> “Directories”. Ensure following changes –

Include Directories – D:\INCLUDE
Library Directories – D:\LIB

10)Save the changes & close the application. From your Desktop, double-click on the DOSBox icon & start coding. Enjoy!!

A sample graphics program in C would now look like :-


void main()
int gd = DETECT, gm;
initgraph(&gd, &gm, “D:\\BGI\\”);
line(5, 5, 200, 250);


If you face any difficulty regarding this, please leave a “message” on any one of the following pages :-!/sarkarsushovan

I’ll try to reply you at the earliest. Thank you! 🙂