Created
January 18, 2018 04:02
-
-
Save gocha/959b01fdda61c42a355f42230d6e5e68 to your computer and use it in GitHub Desktop.
Cygwin: cmd.exe launcher (without quoting)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// runwin32.exe dir "\"C:\Program Files\\\"" | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string> | |
using std::string; | |
int main(int argc, char *argv[]) { | |
string command("cmd /c"); | |
for (int i = 1; i < argc; i++) { | |
command += " "; | |
command += argv[i]; | |
} | |
return system(command.c_str()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment