hi
ý want to execute some DOS commands wýthýn my program.
ýs ýt possýble
hi
ý want to execute some DOS commands wýthýn my program.
ýs ýt possýble
Read dos.h in the help or index... Maybe it might help u.
blueXrogue
Yes it is possible. In the ANSI/ISO C standard there is a header file called <stdlib.h> include it then use a function called system();
Heres an example.
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]){
system("cls"); // Clears the Screen
system("copy file1 file2"); // Copy file
system("del file1"); delete original file
return 1;
}
all OS system commands can be use. BE WARNED they are not likely to be portable programs because the are OS dependent.