Kang Min Yoo Kang Min Yoo - 1 month ago 18
C++ Question

What does the 'L' in front a string mean in C++?

this->textBox1->Name = L"textBox1";


Although it seems to work without the
L
, what is the purpose of the prefix? The way it is used doesn't even make sense to a hardcore C programmer.

Answer

It's a wchar_t literal, for extended character set. Wikipedia has a little discussion on this topic, and c++ examples.

Comments