C++ Escape Sequences
In C++, escape sequences are used to represent special characters within string literals. They begin with a backslash (\), here are all the escape sequences which you can include in strings:
| Escape Sequence | Represented Character |
|---|---|
\a | System bell (beep sound) |
\b | Backspace |
\f | Formfeed (page break) |
\n | Newline (line break) |
\r | ”Carriage return” (returns cursor to start of line) |
\t | Tab |
\\ | Backslash |
\' | Single quote character |
\" | Double quote character |
\some integer x | The character represented by x |