Link to home
Start Free TrialLog in
Avatar of Unreal7000
Unreal7000

asked on

Dos Commands in C++

I have a program that i am writing and I want to include DOS commands in the code but when i compile it gives me an error. Do i have to have a certain header file or what. Im completely stumped. I am using DEV C++ and Borland Turbo C++. I just write out the command directly.I am on a PC running Win98. This is a dos program running in Windows. Some of the errors say stray "/" in program. I use the <stdlib.h> also.
Avatar of chensu
chensu
Flag of Canada image

What function are you using to call DOS commands? Are you writing Windows programs? What platform? What compiler are you using? What error do you get? ...

If you are using the C Run-time Library function system, you need to include <stdlib.h>.
Avatar of Unreal7000
Unreal7000

ASKER

i just write out the dos command directly. These programs are dos run, but can be run in windows, I am using Dev C++ and Borland Turbo C++. I get just a bunch of errors.
Edited text of question.
Edited text of question.
Edited text of question.
ASKER CERTIFIED SOLUTION
Avatar of chensu
chensu
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
By the way, please add comments instead of editting the original question once the thread starts so that it is easy for us to follow.