Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int foo(const char *msg, FILE *file)
{
static const char format[] = "<%x %X> ";
time_t datetime;
struct tm *local;
char buffer [ 80 ];
/*
* Get the current date/time.
*/
if ( time ( &datetime ) == (time_t)(-1) )
{
fputs ( "calendar time is not available\n", stderr );
return 0;
}
/*
* Convert to broken-down time.
*/
local = localtime ( &datetime );
if ( !local )
{
fputs ( "cannot convert to local time\n", stderr );
return 0;
}
/*
* Write the string with the requested format.
*/
if ( !strftime ( buffer, sizeof buffer, format, local ) )
{
fputs ( "could not write format string\n", stderr );
return 0;
}
/*
* Display the results.
*/
fputs ( buffer, file );
fputs ( msg, file );
fflush ( file );
return 1;
}
int main(void)
{
const char errmsg[] = "Error: 'ISA' was not at the beginning of the data\n";
fputs ( errmsg, stdout );
foo ( errmsg, stdout );
return 0;
}
/* my output
Error: 'ISA' was not at the beginning of the data
<02/25/05 11:47:27> Error: 'ISA' was not at the beginning of the data
*/
Click the [link javascriptpenindex(450,250,'/pops/tipvote.cfm?qid=1013595&vhandle=DaveSinkula&votes=1&w=450&h=250')]"Thank DaveSinkula for this valuable post!"[/url] at the bottom of his response.Give this man some points Admin!