BigETI

apt-install.cpp

Feb 16th, 2015
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <string.h>
  4.  
  5. int main(int argc, char *argv[])
  6. {
  7.     int ret = 0;
  8.     std::string cmd("apt-get install ");
  9.     if(argc > 1) ret = system((cmd += argv[1]).c_str());
  10.     else std::wcout << L"USAGE: apt-install <arguments>\r\n\r\n";
  11.     return ret;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment