-
November 29th, 2008, 11:49 AM
#1
What does "L" in front of string mean?
I used Visual C++ Express 2005 and seen this code.
Code:
this->Name = S"Form1";
Now I am using Visual C++ Express 2008 and I see this code.
Code:
this->Name = L"Form1";
I do not understand what the "S" and "L" are used for. I use C# mainly and have never seen this before. I searched on the Internet and found some examples. I read two articles about wide-character literals or something similar.
Neither of the articles made any since to me. I'm more confused now then I was before I read them.
Why do I need those characters in front of my strings, and what happens if I don't use them?
I think this might even be a Managed C++ issue, but I'm not sure where it fits.
Three5Eight
Using: MS C# 08 EE, MS SQL 05 EE, C++ .Net 08 EE, Vista Home Premium, XP Home
-
November 29th, 2008, 12:34 PM
#2
Re: What does "L" in front of string mean?
They are used to control UNICODE with respect to literals.
Start here
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|