C++ Character Set

Character sets affect the fundamental part of the program code, the storage and transmission of data and the logic with which you manipulate text.

The Character set inC++ includes the following"

Source Code Character Set

A C++ compiler may use any character set that includes at least the following characters:

The 52 upper case and lower case alphabetic characters ( 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 ), the 10 decimal deigits ( 0 1 2 3 4 5 6 7 8 9 ), the blank or spcae character and 29 designated graphic characters ( ! # % ^ - _ + = ~ [ ] \ | ; : ' " { } . , < > / ? ).

Five formatting characters (backspace horizontal tab, vertical tab, form feed, and carriage return) are often used in C++ (formatting characters are treated as spaces). The dollar sign ($) and the at sign (@) are also commomly used. (but not required by the standard).

Execution Character Set

the execution character set for c++ is required to heve the standard characters of the source code character set, plus a null character and a new line character. This null character must have the value 0 and is used to mark the end of strings.

White Space

White space in C++ includes the blank (space character), horizontal tab, end-of-line, vertical tab, form feed, and comments. White space is ignored by the compiler and therefore can be freely used by the programmer.

Line Termination

Each line in a C++ source program is terminated with an end-of-line character or character sequence. Certain formatting( such as carriage return, form feed or vertical tab) can also terminate lines

HOME LEARN C++ PREVIOUS NEXT