This question already has an answer here:
My ultimate goal is to simplify routine task of compilation and run.
Now I've following commands
1. g++ foo.cpp -o foo --std=c++11 2. chmod foo +x #this may be overkill 3. ./foo
So, my question if this can be done like
with alias or something like that
alias compile='g++ $1.cpp -o $1 --std=c++11'
with no luck