trigraphs - meaning of `???-` in C++ code -


this question has answer here:

i saw following code legacy codes:

 size_t = 1 ???- 2 :0; 

what symbol ???- mean in c++? how should understand it?

thank you!

it's actually:

size_t = 1 ? ~2 :0; 

??- trigraph ~


trigraphs old era... before of born.

back in days, there characters weren't supported. unknowing programmer try type in such character find doesn't exist on keyboard!

enter image description here
image source: http://www.myoldmac.net/cgi-data/forum/phpbb2/viewtopic.php?t=305

so trigraphs added allow programmer access functionality of these characters when didn't exist (either in encoding or keyboard).

nowadays, obsolete , more effective in confusing reader in getting around old standards.

so either code old, or author being jerk.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -