Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   How to determine whether a compiler supports wide character or not (http://www.velocityreviews.com/forums/t315316-how-to-determine-whether-a-compiler-supports-wide-character-or-not.html)

Ashabul Yeameen 09-16-2003 06:51 PM

How to determine whether a compiler supports wide character or not
 
I am writing a program which at some point need to call fputwc()
function. But since I want to make this code portable I've decided to
write my own fputwc() funcion where the compiler doesn't supply this
funcion. But how to determine whether the compiler supports wide
character or not (depending on which my funcion will compile). Is
there any preprocessor directive?

thanks in advance

-Yeameen

Mike Wahler 09-16-2003 07:45 PM

Re: How to determine whether a compiler supports wide character or not
 

Ashabul Yeameen <ayeameen@yahoo.com> wrote in message
news:b2e73968.0309161051.3dfe166e@posting.google.c om...
> I am writing a program which at some point need to call fputwc()
> function. But since I want to make this code portable I've decided to
> write my own fputwc() funcion where the compiler doesn't supply this
> funcion. But how to determine whether the compiler supports wide
> character or not (depending on which my funcion will compile). Is
> there any preprocessor directive?


#include <stddef.h>

int main()
{
wchar_t wc;
return 0;
}

If it compiles, your implementation supports wide characters.

-Mike





All times are GMT. The time now is 05:40 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.