using wcsxfrm to find out length of new collated form

Joined
Sep 19, 2005
Messages
4
Reaction score
0
Im using VS Studio. Net 2005 to find out the transformed length of wide char string based on specific locale.

char* p = setlocale(LC_COLLATE,NULL);//US Locale on my machine.

wchar_t tp[6] = L"Hello";

size_t size = wcsxfrm(NULL, tp, 0);



cout<<
"Size "<<size<<endl;

But it seems that I can't pass NULL as destination string since it gives me runtime error in wcsfrm.c file. But same code works on 2003 studio.

Can anyone suggest me what is wrong with it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top