#include <iostream> #include <cstdlib> #include <cstdio> #include <stdlib.h> #include <stdarg.h> using namespace std; int logfile(const char * format, ...) { FILE *logfile; logfile=fopen("1.txt","a+"); va_list arg_ptr; va_start(arg_ptr, format); int nWrittenBytes = vfprintf(logfile, format, arg_ptr); va_end(arg_ptr); return nWrittenBytes; } int main() { logfile("%s logged out.","124"); }
作者:qiqijianglu 发表于2013-8-1 16:38:18 原文链接
阅读:40 评论:0 查看评论