1. Home >
  2. Apps >
  3. Groups >

problem in a c program

Question asked by accoolaryan in #Coffee Room on Feb 1, 2010
accoolaryan
accoolaryan ยท Feb 1, 2010
Rank D3 - MASTER
hi
i want to include a dos command in c program .
how can i include it so when i run my program so it should run that command?
😕 Posted in: #Coffee Room
dipen30
dipen30 ยท Feb 1, 2010
Rank D1 - MASTER
there is a header file in c "dos.h" include that file.
gaurav.bhorkar
gaurav.bhorkar ยท Feb 1, 2010
Rank B2 - LEADER
accoolaryan
hi
i want to include a dos command in c program .
how can i include it so when i run my program so it should run that command?
๐Ÿ˜•
If you are using Visual C++ or Dev C++ to compile your programs, then you can use the system () function. Make sure you #include in your program.

Syntax:

system ("command");

For eg. to clear the screen you can use - system ("cls");
Manish Goyal
Manish Goyal ยท Feb 1, 2010
Rank A2 - PRO
addition to previous post
Don't forget to use
#include

You must log-in or sign-up to reply to this post.

Click to Log-In or Sign-Up