May 22, 2011 at 11:11am UTC
Like we place L"string" in some cases
What type of token is this L?
May 22, 2011 at 11:30am UTC
To specify a string literal of type wide-character , precede the opening double quotation mark with the character L.
May 22, 2011 at 11:35am UTC
I've always wondered, is that defined in a Windows header, or does the compiler recognise it intrinsically?
May 22, 2011 at 11:37am UTC
Wide strings are part of the C++ standard.
May 22, 2011 at 11:45am UTC
Okay then, so is it in a standard header file or recognised by the compiler? I had always assumed the former, but intellisense doesn't list it in my experience.
May 22, 2011 at 12:08pm UTC
Nah, it's not defined in any header. The L just marks the literal as a wide literal, similar to how the f in 1.0f denotes a float literal.
May 22, 2011 at 12:11pm UTC
Ah, that makes sense. Thanks :)