J
jackie
Here is my prolem: i try to output wstring with unicode value greater
than 255(for each wchar_t) to a file such as test.tmp. Here is my code:
wofstream outdata("test.tmp");
wstring s;
long l1=256;
long l2=250;
wchar_t c1=(wchar_t)l1;
wchar_t c2=(wchar_t)l2;
s+=l1;
s+=l2;
outdata<<s<<endl;
outdata.close();
However, there is nothing showes in the output file. But if i assign
any positive value less than 256 to l1 such as: long l1=255, it works
fine.
could someone please tell me what is wrong with my code and the
solution for it?
thanks!
than 255(for each wchar_t) to a file such as test.tmp. Here is my code:
wofstream outdata("test.tmp");
wstring s;
long l1=256;
long l2=250;
wchar_t c1=(wchar_t)l1;
wchar_t c2=(wchar_t)l2;
s+=l1;
s+=l2;
outdata<<s<<endl;
outdata.close();
However, there is nothing showes in the output file. But if i assign
any positive value less than 256 to l1 such as: long l1=255, it works
fine.
could someone please tell me what is wrong with my code and the
solution for it?
thanks!