|
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?
|