I'm seeing some character constant notation in C++ code that looks alien to me. Please educate me on this:
if (dc == L' '){
What does the L indicate?
Is it part of the standard?
Thanks,
lang2
L
is a literal specifier. For characters, it means wchar_t
, so the type of L'a'
is wchar_t
. For strings, it means "array of wchar_t
", so L"hello"
is a wchar_t[6]
. (And for integers, it means "long", so 1L
is a long int
.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With