Wait, no trigraphs anymore???
This is horrible, I loved using `and` and `not` and `or` in C boolean expressions and to pretend I'm writing Python code. It's fun!
This is horrible, I loved using `and` and `not` and `or` in C boolean expressions and to pretend I'm writing Python code. It's fun!
#define and &&
#define not !
/* ... and so on */
In C++, they're actually keywords that are built into the language, so you don't need a header then.When people talk about trigraphs in C, they're talking about the trigraphs listed on this page: https://en.cppreference.com/w/c/language/operator_alternativ...
In C, "trigraph" specifically refers to nine special sequences beginning with "??": https://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C
They were used to provide an alternate way of typing punctuation characters for keyboards that don't have them (e.g. "??(" is "[").