TIL that you can #include "/dev/stdin"$ cat in"Hello, world!"$ cat a.cpp#include <stdio.h>int main() {printf("%s\n",#include "/dev/stdin");return 0;}$ g++ a.cpp < in && ./a.outHello, world!— Peter Alexander (@Poita_) November 24, 2019
TIL that you can #include "/dev/stdin"$ cat in"Hello, world!"$ cat a.cpp#include <stdio.h>int main() {printf("%s\n",#include "/dev/stdin");return 0;}$ g++ a.cpp < in && ./a.outHello, world!