This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
basic queries regarding wchar_t
- From: "Shoaib Naazir" <shoaib dot naazir at gmail dot com>
- To: gcc at gcc dot gnu dot org, gcc-help at gcc dot gnu dot org
- Date: Thu, 10 Jan 2008 04:03:00 +0500
- Subject: basic queries regarding wchar_t
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......