Created
October 11, 2016 01:47
-
-
Save GasparCorrea/733dcc7b7174a3d64d0ed619e4bde926 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
mkdir $1 | |
cd ./$1 | |
touch "$1.cpp" | |
echo "$1: $1.cpp" > makefile | |
echo " g++ $1.cpp -o $1" >> makefile | |
echo '#include <iostream>' >> $1.cpp | |
echo '' >> $1.cpp | |
echo 'using namespace std;' >> $1.cpp | |
echo '' >> $1.cpp | |
echo 'int main()' >> $1.cpp | |
echo '{' >> $1.cpp | |
echo ' return 0;' >> $1.cpp | |
echo '}' >> $1.cpp | |
vim $1.cpp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Template for a new
C++
project.To execute:
The script does the following:
foo
and afoo.cpp
with its makefile.foo.cpp
with vim