views:

287

answers:

3

Hi, I'm having problems opening directly TurboC++ compiler(dos version) on Windows X. if I click on the TurboC++ icon through windows GUI it opens for a sec(a blank dos screen) and shuts down. so i have to access it through the command line i.e.,

cmd  (enter)
c:\tc\bin (enter)
tc.exe

This way TurboC++ opens and I'm able to program and everything..

Why do I have to always start tc.exe through the command line? Why can't I start it through Windows XP?

Also, after starting tc.exe through the command line, I am unable to execute any graphics program through it.

I write a simple code for creating a circle using predefined functions.. when i compile and run the program tc.exe exits and returns back to the command prompt.

Why does this happen?Is there a solution?

I have also tried using DosBox to run TurboC++. it closes on executing the graphics program.

ps: this problem has occurred to only me and my friend..... all PCs in our college have Windows XP or Vista installed and they have no problems. im using initgraph(); function for initialising graphics drivers(using autodetect) and graphic mode.i have given the proper address for bgi files. and the folder contains the file required (EGAVGA.bgi). this program works fine in our college.does this have something to do about my graphics card(nvidia 9400 1gb)?

A: 

Graphics in the 80s were a completely different world than today - directly accessing hardware, often using undocumented features to optimize performance. Drivers didn't exist in DOS. Each program had to write their own hardware layer (hence why under DOS, you had to configure the video and soundcard for every single game separately. The fact that we can run any software from the 80s is a testament to the backwards compatibility work done by Microsoft.

You might have some luck running it on VirtualPC, VMWare or VirtualBox. All of them offer a free version, and if you can find and old copy of DOS 6.22 lying around, you might be good to go. Otherwise, you'll likely be stuck finding a physical 486 running Windows 3.11, and working on that. Depending on what deals your college has with Microsoft, they should be able to get a copy of DOS 6.22 for free - it's still offered for download on MSDN. Although, if you're still using TurboC++, they have not likely signed up for anything with MS. You can also try FreeDOS.

Eclipse
Just to add another option to the list FreeDOS can be another option
David Rodríguez - dribeas
Note that Fizz said that it works when starting from a cmd window. (TC was using Borland's own TurboVision. I doubt that this poked directly into the graphic card.)
sbi
He said it worked until he started using graphics.
Eclipse
@Eclipse: You're right, I hadn't read that far. (Sorry, but that spelling makes it really hard to read...)
sbi
sorry guys,, i had no idea it would be hard for you to read(sms language)..please bear with it.. i shall write correct spellings now onwards
PVB
correct spellings? That sounds promising.
Earlz
We are able to understand your txt spk fine, but showing some effort and respect by writing proper English will get more people interested in your question.
Matti Virkkunen
A: 

Right click on the TC icon and pick Properties. Go to the Compatibility tab. Play with the settings found there. If that doesn't help, ask your teacher how to use a 25 year old program on a modern computer.

sbi
A: 

How are you doing graphics? If you're using int 10h (or equivalent) to change the mode, that should work fine as it stands. If you're using BGI, make sure the program's working folder contains the BGI files that come with Turbo C++ -- for more details on initializing BGI, look up initgraph in the help.

Even modern PCs with modern graphics cards seem to have enough legacy support for the BGI code to work, though it seems like the program always runs fullscreen once in graphics mode, rather than in a window.

I don't know why Turbo C++ might not start from the GUI unfortunately. I've used Borland C++ just now to refresh my memory about the BGI stuff, and it worked OK.

brone
please see ps: section .. i have updated it.
PVB