Controls the use trigraph sequences specified in the ISO standards.
#pragma trigraphs on | off | reset
If you are writing code that must strictly adhere to the ANSI standard, enable this pragma.
| Trigraph | Character |
|---|---|
| ??= | # |
| ??/ | \ |
| ??' | ^ |
| ??( | [ |
| ??) | ] |
| ??! | | |
| ??< | { |
| ??> | } |
| ??- | ~ |
Be careful when initializing strings or multi-character constants that contain question marks.
char c = '????'; /* ERROR: Trigraph sequence expands to '??^ */ char d = '\?\?\?\?'; /* OK */