You can use any of the following characters from the ASCII character set to enter programming text into your source file.
a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
0 1 2 3 4 5 6 7 8 9
! " # % & ' ( ) * + , - . / : ; < = > ? [ \ ] ^ _ { | } ~
In extended and compatible language levels, the compiler allows the $ (dollar sign) character in C++ identifiers to facilitate calls between different languages and porting code. In ansi language level, the $ (dollar sign) character is not permitted in C++ identifiers. The default language level for the compiler is extended. Language level is set with the #pragma langlvl or the /S option on Intel, langlvl option on AIX.
Some characters from the C character set are not available in all environments. You can enter these characters into a C source file using a sequences of two or three characters. A sequence of three characters called a trigraph. A sequence of two characters is called a digraph, but will be accepted by the compiler only if the -qdigraph compiler option is in effect on AIX. Digraph or trigraph character sequences appearing in character or string literals are not replaced during the preprocessor stage.
Digraph and trigraph sequences available to you are:
Digraph and Trigraph Sequences | |||
Digraphs | Trigraphs | Character(s) Represented | Description |
---|---|---|---|
<: | ??( | [ | left bracket |
:< | ??) | ] | right bracket |
<% | ??< | { | left brace |
%> | ??> | } | right brace |
??/ | \ | backslash | |
??' | ^ | caret | |
??! | | | pipe | |
??- | ~ | tilde | |
%: | ??= | # | pound sign |
%:%: | ## | preprocessor macro concatenation operator |