public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* basic queries regarding wchar_t
@ 2008-01-09 23:03 Shoaib Naazir
  0 siblings, 0 replies; only message in thread
From: Shoaib Naazir @ 2008-01-09 23:03 UTC (permalink / raw)
  To: gcc, gcc-help

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......

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-09 23:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-09 23:03 basic queries regarding wchar_t Shoaib Naazir

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).