
Shebang for C ... Almost - noyez
https://noyez.gitlab.io/post/2018-06-25-stupid-c-trick-almost-shebang/
======
tantalor
This is easier to do as a little script that compiles and runs the code.

    
    
      /** foo.cc **/
      #! compile-and-run-cc.sh
      int main() { ... }
    
      /** compile-and-run-cc.sh **/
      // .cc file is passed in as first argument to this script
    

You can get fancy with passing in compile or runtime args.

~~~
noyez
Does the foo.cc compile as a standalone file with the `#!` at the beginning?

~~~
tantalor
Probably not, remove it before passing to compiler

