RE: [Dev-C++] Make switch condition an enum
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ho...> - 2002-10-19 18:04:36
|
> -----Original Message-----
> From: Per Westermark [mailto:pw...@ia...]
> Sent: Saturday, October 19, 2002 2:26 PM
> To: Ioannis Vranos
> Cc: dev...@li...
> Subject: RE: [Dev-C++] Make switch condition an enum
>
>
> The _T(x) is a macro used by a Microsoft Developer Studio,
> the wxWindows
> framework etc, to handle wide/non-wide, characters. All you
> have to do is
> to #define _UNICODE (or sometimes #define UNICODE, or in wxWindows
> #define wxUSE_UNICODE 1) to switch all "tagged"
> strings to wide character strings.
I do not know Win32 API-specific stuff but concerning ANSI C and ANSI
C++ you can define a string literal as a wide character one by placing
the capital letter L in front of it. For example consider the C90
program:
#include <stdio.h>
#include <stddef.h>
int main()
{
const wchar_t *ws=L"Wide character string";
wprintf(L"%s\n", ws);
return 0;
}
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.freeurl.com
* Alternative URL: http://run.to/noicys
|