\n |
new line. (改行) |
\t |
Tab |
\b |
Back Space |
\f |
Form Feed |
\a |
Beep |
\r |
carriage return |
\' |
single quotation |
\" |
double quotation |
\\ |
Back Slash(Yen mark) |
#include <iostream.h> int main() { cout << "newline->\n<-newline" << endl ; cout << "tab->\t<-tab" << endl ; cout << "BackSpace ->>\b" << endl ; cout << "FormFeed->\f<-" << endl ; cout << "carriage return->\rCARRIAGE" << endl ; cout << "single quotation->\'<-" << endl ; cout << "double quotation->\"<-" << endl ; cout << "Back Slash(Yen)->\\<-" << endl ; return 0 ; } |
newline-> <-newline tab-> <-tab BackSpace ->! FormFeed-><- CARRIAGE return-> single quotation->'<- double quotation->"<- Back Slash(Yen)->\<- |
他にも escape sequence code で次のように表現できます。
#include <iostream.h> int main() { // 十進数表記で A = 65 cout << "八進数表記\t \101" << endl ; cout << "十六進数表記\t \x41" << endl ; return 0 ; } |
八進数表記 A 十六進数表記 A |