#include <wchar.h>
|
|
int
putws (const wchar_t * restrict ws); |
#include <stdio.h>
#include <wchar.h>
/* Illustrates how to use putws API */
int example_putws()
{
wchar_t buf[12];
FILE* op;
FILE* stdop = freopen("c:\stdop","w+",stdout);
putws(L"Hello World"); //write to stdout
fclose(stdop);
op = freopen("c:\stdop","r",stdout);
fgetws(buf, 12, op); //read from stdout
fclose(stdop);
remove("c:\stdop");
if(!(wcsncmp(L"Hello World", buf, 11)))
{
return 0;
}
return -1;
}
}
| [EFAULT] | |
| The ws argument supplied is NULL. | |
The putws function may also fail and set errno for any of the errors specified for the routine write.
|
© 2008-2009 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. |