OS: Windows XP
C++: Microsoft Visual C++ 2005
I am wondering if it is possible to kill the C++ program after calling another program (i.e. .bat). I did a simple test and check the "Windows Task Manager". After the exe run the .bat the exe is still there until the .bat finished running. Is that possible to kill the .exe after the .bat is called.
Expand|Select|Wrap|Line Numbers
- // Filename:test.cpp
- #include <iostream>
- int main()
- {
- std::cout << "Calling run.bat";
- std::cout << "\n";
- system ("stage\\run.bat");
- return 0;
- }