Re: Passing all multiple arguments for a function in C

Adam Morrison <[email protected]> Sun, 16 Dec 2007 17:28:20 +0200
Newsgroups gmane.culture.hackers.israel
Message-ID <20071216152820.GA20867@false>
On Sun, Dec 16, 2007 at 08:50:58AM -0000, leiboviche wrote:

> I'm facing a situation that probably occurs to writers of most
> applications with log file capabilities.
> I wish to have a function log() which only redirects it's input to an
> already opened file:
> int log(char *fmt,...) {
>   /* I want to call fprintf(logfile,fmt,...);

Check out vfprintf(3).