Created
July 16, 2023 21:25
-
-
Save WingTillDie/9fa6dcd66b8a15ceeb927cc766124d51 to your computer and use it in GitHub Desktop.
Run C++ as script by gcc, tcc, clang
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
#if 0 | |
gcc -x c++ "$0" | |
if [ $? -eq 0 ]; then | |
./a.out "$@" | |
fi | |
exit | |
clang -x c++ "$0" | |
if [ $? -eq 0 ]; then | |
./a.out "$@" | |
fi | |
exit | |
tcc -run "$0" "$@" | |
exit | |
#endif | |
int main(){ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment