# C++ IN XP



## chillnow (Jul 9, 2005)

I have windows XP professional edition,,,no patches.....no sp1 or sp2. I cant install or even run C++ or turbo or anything like it.....it says invalid program file name...check ur pif file.....
one of the exe files also says NTVDM does not support rom basic.
also sometimes the application runs but closes down in a few seconds....
HELP!
PS.
(and obviously i have pirated version of XP)


----------



## chinmay (Jul 9, 2005)

Hey Turbo C++ runs fine on my PC ... PM me if you want the software ...by the way .. u got to run the file C:\TC\BIN\TC.EXE .. may be you are running some other file


----------



## q3_abhi (Jul 9, 2005)

Turbo C++ runs fine on Windows XP. Try to run it from command prompt. Run the correct .exe file for installation.


----------



## hsksattish (Jul 10, 2005)

better use dev c++ its free an better


----------



## King_Niral (Jul 10, 2005)

*No advertising of personal websites. You have been warned enough. One more such instance and you will be put on warning.*

*ctrl_alt_del*


----------



## shoaibjameel123 (Jul 10, 2005)

If you have TC ver 3.0 go to the TC directory and run TC.EXE
It will work fine.


----------



## ujjwal (Jul 10, 2005)

As turbo c is a dos based application I am unsure of its compatibility in Windows NT series OS's, but as someone suggested, try Dev C++, it should run fine -

*www.bloodshed.net/devcpp.html

King_Niral, once or twice may have been tolerable, but it gets quite annoying if you advertise your forum in every query for help.


----------



## expertno.1 (Jul 10, 2005)

use dosbox is u have any problems

i think it is a dos emulator so it may work


----------



## iinfi (Jul 10, 2005)

i need vga.h and vgagl.h
anyone here has it?? 

i dont have extensive knowledge of this kinda C program but i need to run this one



> #include <stdio.h>
> #include <vga.h>
> #include <vgagl.h>
> 
> ...


----------



## kooladi (Jul 11, 2005)

*reply to vga*

hi,
from the looks of it you are trying to write on the screen using a vga function .What that means is, that you are trying to access ur Video's memory directly. Now, well thats allowed in Win98, but WinXp doesnt have a DOS. I mean what u see in winxp is fake Dos. It itself is an emulator..not the real thing.
My point is even if you get hold of those files, you still wont be able to run them in Winxp.
and if you want to write them for Win 98, I can write them for you without the use of those header files. Just PM me.
bye
hope i was of any help


----------



## siriusb (Jul 11, 2005)

I have drawn onto the vid mem in my xp. You just need to be in the turbo c++ env.
BTW, the vgagl.h seems to be from a site svgalib.org, which I cannot access at this time. But, being opengl and included with source in linux, you must be able to find this lib in any linux distro.


----------



## abhishekkulkarni (Jul 11, 2005)

Well since Windows XP is not a dos - based OS it isn't compatible with DOS programs to the extent that Windows 98,95 are.

So you can try changing the compatibility options for TC.exe by going to 

->

Right click on TC.exe -> Compatibility -> Change the OS to Win 98.

See if this works.


----------



## iinfi (Jul 11, 2005)

but i dont have these two files 

vga.h
vgagl.h


----------



## deathvirus_me (Jul 11, 2005)

tc++ 4.5 runs pretty well ....


----------



## aniketvanmali (Jul 12, 2005)

USE THE COMPATIBILITY MODE AND RUN THE TURBO C++ UNDER THE COMPATIBILITY OF WINDOWS 98/WINDOWS ME. TO RUN THE COMPATIBILITY:
1)Create a Shortcut of turbo c.
2)Rt Click the shortcut & click "Properties".
3)Select the "Compatibility" Tab (the 3rd frame).
4)"Check" the checkbox "Run this program under compatibility of:"
5)Now select the option "Windows 98/Windows ME" from the dropbox list.
6)Click "Apply" & "OK".
7)Here U Go, now run the turbo c by double clicking the same shortcut.
I Hope the Solution works as it worked on my pc.


----------



## iinfi (Jul 12, 2005)

man 
but i dont have these two files 

vga.h
vgagl.h

how do i compile  the program in the first place .... plz tell me where to get these 2 files .....


----------



## chillnow (Jul 13, 2005)

i got dev-c++(thanx to those who suggested)....much better program,,,nd not the ancient TC.
anways....what will be the differences(if any) between turboc++ and devc++???

By the way...this site might have wat ur lookin for(vga.h)---
*www.koders.com/cpp/fid3EDA1C3413E87A5E1343BB9C301B7EFA8A9F1135.aspx


----------



## hafees (Jul 14, 2005)

Turbo C++ should work with windows XP. it may be because of a missing  or corrupted file 'autoexec.nt'
This file will be executed everytime when a dos pgm is starting to execute.

this file should be found in C:\windows\system32\ (assuming C is your WIndows drive). If it is not there create this file ('autoexec.nt') using notepad or anyother text editor. Typically the file should contain the following lines (Some comments are deleted). 

@echo off 
REM Install CD ROM extensions
lh %SystemRoot%\system32\mscdexnt.exe
REM Install network redirector (load before dosx.exe)
lh %SystemRoot%\system32\redir

REM Install DPMI support (this is needed)
lh %SystemRoot%\system32\dosx



Add the above lines to autoexec.nt and save it to C:\windows\system32.  Now it should work.

Pls tell us the results.


----------



## iinfi (Jul 14, 2005)

i got vga.h frm the site which chillnow quoted earlier itself ......

but the compiler shows some problem with the file ...

and i still didnt get the vgagl.h file which i need to run the program ...


----------



## anubhav_har (Oct 4, 2005)

check this topic *www.thinkdigit.com/forum/viewtopic.php?t=8919&highlight=ntvdm


----------



## chanduthebest (Oct 4, 2005)

When i try running turbo C i get this error :

"
16 bit Windows Subsystem

C:\Windows\system32\autoexec.nt.The system file is not suitable for running Ms-DOS and Microsoft Windows applications.Choose 'Close' to terminate the application. "


What can be done ?


----------



## alib_i (Oct 4, 2005)

see the post just before yours
(last post in previous page)

-----
alibi


----------

