Archived

This topic is now archived and is closed to further replies.

This topic is 5980 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I often see people putting L after numbers in their code. This may be a stupid question, but what does that L mean? -Forcas
"Elvis is alive. He is Barney the purple dinosaur. He is the pied piper that leads our children into the wages of sin and eternal damnation."

Share this post


Link to post
Share on other sites
Yes, L means long (AFAIK).
But in front of the string: L"test.txt", it converts your string to WideChar-mode. (VC++ macro ?)


Press any key to continue or any other key to quit...

Share this post


Link to post
Share on other sites
The L suffix makes the numeric constant a long, just like U makes it unsigned.

The L prefix is a standard C++ language feature; in other words, it has nothing to do with VC++ or any other compiler. However, L is not part of C, so it''s an extension in compilers that allow it.

Share this post


Link to post
Share on other sites