3 ms·
There is no way to solve this so that you have a single file X.cc that you can feed to g++ as an argument: g++ X.cc ... and such that this file is a hash ba
by kazinator 4y ago
There is no way to solve this so that you have a single file X.cc that you can feed to g++ as an argument:
g++ X.cc ...
and such that this file is a hash bang script.
C and C++ can be hash-bang scripted, through a shell script which cuts out the incompatible material and feeds the rest to the compiler. See the solution for the multiline shebang task in Rosetta Code:
https://rosettacode.org/wiki/Multiline_shebang#C https://rosettacode.org/wiki/Multiline_shebang#C
I'm guess you're trying to make the program self-editing rather than self executing, by using Vim as the interpreter?