![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Hobbyist Programmer
Join Date: Mar 2005
Posts: 148
Rep Power: 4
![]() |
About using escape sequences
I found out that in order to use an escape sequence you must enclose it within either double quotes or single quotes like this:
cout << number << "\t" << endl; or cout << number << '\t' << endl; If you do this the compiler will complain: cout << number\t << endl; I guess what I'm asking is the why of it(I'd like to know as much as possible cuz I always document my programs). Why for instance must you enclose the escape sequence in quotes? And why do both "\t" and '\t' work? |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|