syntax highlight

Thursday 19 May 2016

I can't believe this works!

Are you bored? Try pasting this, as is, in a cpp file:

// What is going on here??/
Is this even legal C++??/
Yes, it is!

NB: You may have to use -trigraphs to compile this. Try it out! You can use this command:

echo -e "// What is going on here??/Is this legal C++?" | g++ -E -c -trigraphs -

With some luck, this won't be legal C++ anymore after C++ 17 deprecates trigraphs.

No comments:

Post a Comment