Skip to content

Instantly share code, notes, and snippets.

@shinkwhek
Created May 9, 2017 08:52
Show Gist options
  • Save shinkwhek/cf97b58cfa7e226d6341e2bf6db5697b to your computer and use it in GitHub Desktop.
Save shinkwhek/cf97b58cfa7e226d6341e2bf6db5697b to your computer and use it in GitHub Desktop.
#include<stdarg.h>
#include<stdio.h>
int fprintf_t (FILE * stream,
const char * format, ...)
{
va_list ap;
int ret;
va_start(ap, format);
ret = vfprintf(stream, format, ap);
va_end(ap);
return ret;
}
int main (void) {
fprintf_t(stdout,"num:%d\n",1);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment