Tuesday, July 14, 2009

Calling a batch file in C++ script?

How Do i Call to a batch file named open.bat in a C++ script





How do i tell it to call a batch file from the following script:





#include %26lt;iostream%26gt;


using namespace std;





int main ()


{


cout %26lt;%26lt; "Hello\n ";


cout %26lt;%26lt; "\nTestingSomething\n";


cout %26lt;%26lt; "\nI hope this works\n";


cout %26lt;%26lt; "\nIm going to launch a batch file\n\n";





return 0;


}








I want to see what the script looks like after you've told it to add the batch file.





Show me what the script will look like after the calling of the batch file is added.

Calling a batch file in C++ script?
you probably want to call system()





http://www.cplusplus.com/reference/clibr...


No comments:

Post a Comment