Is it possible to call a DOS batch program???If so how?
Thanks alot
Is it possible to call a DOS batch program???If so how?
Thanks alot
Look up the system command.
Example taken from www.cplusplus.comCode:/* system example : DIR */ #include <stdio.h> #include <stdlib.h> int main () { int i; puts ("Trying to execute command DIR"); i = system ("dir"); if (i==-1) puts ("Error executing DIR"); else puts ("Command successfully executed"); return 0; }
It is of course possible just to use;
system("dir"); // or in your case
system("myprog.bat");
But then you have no error checking. (Doesn't stop most people)