Subj : Re: varargs(ish) To : comp.programming From : Alex Fraser Date : Sun Aug 21 2005 01:10 am "pemo" wrote in message news:kBJNe.92863$G8.76586@text.news.blueyonder.co.uk... > I'd like to write a C function that can accept variable args *and* a > fixed arg that tells the function whether to output to stdout and > optionally, a file. Your emphasis doesn't make sense. You would have the same problem regardless, which is equivalent to: void out(const char *fmt, ...) { /* somehow call printf() with the correct arguments */ } The solution in the above case is to use vprintf() instead. Alex .