basic queries regarding wchar_t

Shoaib Naazir
Fri Jan 11 00:25:00 GMT 2008

   Am new to unicode programming and was playing with the following program..

#include <stdlib.h>
#include <stdio.h>
#include <wchar.h>

int main(int narg, char *varg[])
         wprintf(L"%ls\n", L"This is a test of wprintf");
        printf("%s\n", "This is a test of printf");
        return 0;

Compiling it using the following gcc command:
gcc -Wall ./wchar_test.c -o ./wchar_test

I get the following warning:
./wchar_test.c: In function 'main':
./wchar_test.c:7: warning: implicit declaration of function 'wprintf'

Can anyone explain me why??

The output is not what atleast i was expecting, the output is as follows:
This is a test of wprintf

Shouldn't the second string be printed as well????



More information about the Gcc-help mailing list