My other and final problem
Jul 21, 2008 at 10:55am UTC
how could I close explorer.exe from my program it's probally simple but I dunno :D thanks for the help!
Jul 21, 2008 at 4:50pm UTC
How about something like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
//Variable
string killExplorer = "taskkill /IM explorer.exe" ;
string command = killExplorer;
system( command.c_str() );
system("PAUSE" );
return EXIT_SUCCESS;
}
Jul 22, 2008 at 5:34pm UTC
Oh, well, great job, there. Convert a char array to a string, then copy that to another string, then get the char array from that string and pass that to system().
Replace lines 11-15 with
system("taskkill /IM explorer.exe" );
Topic archived. No new replies allowed.