Created
December 7, 2018 19:08
-
-
Save ernestognw/0ad465fd0e3d63661259baee6b790ab2 to your computer and use it in GitHub Desktop.
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
function cpp() { | |
mkdir $1; | |
cd $1; | |
touch $1.cpp; | |
now=$(date); | |
echo "// $1 | |
// Ernesto García A00820783 | |
// Creado en $now | |
#include<iostream> | |
using namespace std; | |
int main() { | |
// Declarar variables | |
// Desarrollo de tu programa | |
cout << \x22Tu programa con el nombre $1 creado correctamente\x22; | |
// Termina el programa | |
return 0; | |
}" > $1.cpp; | |
g++ $1.cpp -o $1.out; | |
./$1.out; | |
code $1.cpp; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment