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 – http://www.top4download.com/turbo-c-/download-aklqwuba.html
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 – http://sourceforge.net/projects/dosbox/files/latest/download?source=directory.
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\
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 :-
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 :-
I’ll try to reply you at the earliest. Thank you! 🙂