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.
Unreal7000Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

chensuCommented:
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>.
0
Unreal7000Author Commented:
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.
0
Unreal7000Author Commented:
Edited text of question.
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Unreal7000Author Commented:
Edited text of question.
0
Unreal7000Author Commented:
Edited text of question.
0
chensuCommented:
Use the C Run-time Library function system. For example,

system("dir c:\\");
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
chensuCommented:
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.