wchar_t
-
What is wchar_t used for? How can I create a wchar_t string?
-
What is wchar_t used for? How can I create a wchar_t string?
Daniel Kanev wrote:
What is wchar_t used for
A variable of __wchar_t designates a wide-character or multibyte character type. By default wchar_t is a typedef for unsigned short.
Daniel Kanev wrote:
How can I create a wchar_t string?
Use the L prefix before a character or string constant.
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
Daniel Kanev wrote:
What is wchar_t used for
A variable of __wchar_t designates a wide-character or multibyte character type. By default wchar_t is a typedef for unsigned short.
Daniel Kanev wrote:
How can I create a wchar_t string?
Use the L prefix before a character or string constant.
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
wchar_t
is a keyword in C++ and is used to designate wide-character type(not multibyte). In VC7 there's an option to set whether to treatwchar_t
as a built-in type orunsinged short
. -- modified at 3:53 Friday 29th September, 2006fefe.wyx wrote:
(not multibyte).
I Checked this out from MSDN. The exact lines are: A variable of __wchar_t designates a wide-character or multibyte character type. By default, wchar_t is a typedef for unsigned short;
fefe.wyx wrote:
set whether to treat wchar_t as a built-in type or unsinged short.
Yes I have read about it. It's also mentioned in MSDN.
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
What is wchar_t used for? How can I create a wchar_t string?
For Example,When you want to process Chinese font,you have to chose the wchar type in your programer.:laugh::laugh:
-
What is wchar_t used for? How can I create a wchar_t string?
Daniel Kanev wrote:
How can I create a wchar_t string?
The STL class
wstring
deals withwchar_t
's. You can use it just like you would thestring
class (with the wide versions of other STL classes, that is).If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac
-
What is wchar_t used for? How can I create a wchar_t string?