Hi
Do we always surround escape sequences such as \n and \t by quotation marks? I think this is the case. But I'm almost sure that I've seen \n being used without any quotation marks. Could you please confirm it? Thank you.
This is a discussion on do we always surround escape sequences such as \n and \t by quotation marks? within the C++ Programming forums, part of the General Programming Boards category; Hi Do we always surround escape sequences such as \n and \t by quotation marks? I think this is the ...
Hi
Do we always surround escape sequences such as \n and \t by quotation marks? I think this is the case. But I'm almost sure that I've seen \n being used without any quotation marks. Could you please confirm it? Thank you.
I'm an outright beginner. Using Win XP Pro and Code::Blocks. Be nice to me, please.
Perhaps you saw them embedded in a string literal and did not notice the string literal's double quote delimiters.
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
I'm an outright beginner. Using Win XP Pro and Code::Blocks. Be nice to me, please.
An ASCII escape sequence is just a character.
A character literal, within C++, has the form '!' where the exclamation marks a character.
A string literal, within C++, has the form "!" where the exclamation marks a sequence of characters.
It isn't an opinion. It is what is.
Soma