What does the 'L' in front a string mean in C++?
It's a wchar_t
literal, for extended character set. Wikipedia has a little discussion on this topic, and c++ examples.
'L' means wchar_t
, which, as opposed to a normal character, requires 16-bits of storage rather than 8-bits. Here's an example:
"A" = 41
"ABC" = 41 42 43
L"A" = 00 41
L"ABC" = 00 41 00 42 00 43
A wchar_t
is twice big as a simple char. In daily use you don't need to use wchar_t, but if you are using windows.h you are going to need it.