Topic: how to use wstring


Author: "Jun XU" <jun.xu@infotalkcorp.com>
Date: Wed, 11 Jul 2001 17:04:23 GMT
Raw View
Hi,

I need your help.

I am using following code
"
wstring wstr = L"                            ";
int len = wstr.length();
"

Some Chinese characters are in the wstr. They should be wchar_t. So I
expected the len is 6, but the len is 12 at runtime. What's wrong?

Thanks
XJ


---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]