Created
December 25, 2014 13:13
-
-
Save ymurase/536234542c5ee96a0c6e to your computer and use it in GitHub Desktop.
call system from c++
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
#include <iostream> | |
int main(int argc, char* argv[]) { | |
std::cout << "starting..." << std::endl; | |
system("ls"); | |
std::cout << "ls done" << std::endl; | |
std::cout << "running: " << argv[1] << std::endl; | |
system(argv[1]); | |
std::cout << "finished" << std::endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment