[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
CppWchar_t

(C++) wchar_t

wchar_t is a data type (and thus a keyword) that can contain characters.

The range of a char_t can be found at compile time with std::numeric_limits.

Converting wchar_t to char

From a discussion here, thanks to Stober:

wchar_t helloW[] = _TEXT("Hello World");
char helloA[20] = {0};
// now convert the string
wcstombs(helloA, helloW, wcslen(helloW)+1);


last edited (June 17, 2007) by bilderbikkel, Number of views: 2466, Current Rev: 6 (Diff)

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.