我想用 vfprintf(FILE * stream, const char * format , va_list arg)
因为 fprintf 继承的膨胀。
是否可以使用 vfprintf 而无需为此编写包装函数,例如以某种方式创建 va_list 参数?
最佳答案
从上面的评论来看,听起来您实际上想完全避免 printf
系列函数。
在这种情况下,您可以使用以下内容:
fputs("Error occured with file ", stderr);
fputs(file, stderr);
fputc('\n', stderr);
关于c - 使用 vfprintf 而不使用包装函数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7451460/