basic queries regarding wchar_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
   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

First,
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??

Second,
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????

Thanks.

-- 
Lidz......

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux