4 ms·
Awesome comment on trigraphs in C: These let you use the "WTF operator": (foo() != ERROR)??!??! cerr << "Error occurred" << endl;
by profquail 16y ago
Awesome comment on trigraphs in C:
These let you use the "WTF operator":
(foo() != ERROR)??!??! cerr << "Error occurred" << endl;
- tome 16y ago[Language pedant: although it's legal C, the use of cerr and endl and << is more likely to occur in C++!]
- senki 16y ago<< is C++ only.
- mahmud 16y ago"Goddamn operator overloading" -- Rev Wright
- senki 16y agoStrangest language feature...
- tome 16y ago<< is the left-shift operator in C, so the OP's code is syntactically valid C. It ought not to compile though, since it's trying to shift cerr by a string!
- senki 16y agoThanks. Sorry. I'm stupid...