basic queries regarding wchar_t
Shoaib Naazir
shoaib.naazir@gmail.com
Fri Jan 11 00:25:00 GMT 2008
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......
More information about the Gcc-help
mailing list