Created
June 29, 2017 22:35
-
-
Save mtimkovich/7c6019f9c565644e0d658e5189163836 to your computer and use it in GitHub Desktop.
like go run but for c++
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
cpps() { | |
exe=/tmp/$(basename $1 .cpp) | |
g++ -std=c++11 -g -O0 $1 -o $exe || return 1 | |
if [ -z "$2" ] | |
then | |
$exe | |
else | |
$exe "${@:2}" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment