I want a code in one line only. I haven't found something usefull for the moment.
Exemple, I have:
#include <unistd.h>
int function(){write(1,"abcdefghijkmnopqrstuvwxyz\n",27);return(0);}
And I'm searching something like:
#include <unistd.h>;int function(){write(1,"abcdefghijkmnopqrstuvwxyz\n",27);return(0);}
You can't. The #include
preprocessing directive must be followed by a newline. It's part of the syntax (6.10.1 in the C standard http://open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf).
It's generally okay to omit headers from your one-liner, although even better to make the code compile without headers. If someone is going to plug your one-liner into a compiler, they'll know enough to fix a missing header or two.
Such code violates the C standard. Per section 6.10, an #include
preprocessor directive takes the form:
# include pp-tokens new-line
Note that the new line is required.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With