I'm under linux and always run my test program like this:
g++ MyFileName.cpp -std=c++11 && ./a.out
I don't with to type so much, I wish to write a bash alias in my .bashrc, named c++run, so that I can:
c++run MyFileName.cpp
It compiles and if success, run ./a.out
How to write such an alias? If not possible, write a bash function?