Skip to content

Instantly share code, notes, and snippets.

@sebassdc
Created February 26, 2017 05:26
Show Gist options
  • Save sebassdc/2828fd3d8e14f462848dba8b371d50c2 to your computer and use it in GitHub Desktop.
Save sebassdc/2828fd3d8e14f462848dba8b371d50c2 to your computer and use it in GitHub Desktop.
Ahorra tiempo para compilar c++
// ahorra tiempo para compilar c++
#include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
int main(int argc, char const *argv[]) {
string filename(argv[1]), result, callString;
result = filename.substr(0 , filename.length() - 4);
callString = "g++ -o "+ result + " " + filename;
cout << callString << endl;
system(callString.c_str());
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment