Re: passing a va_list to sprintf
From: Shea Martin (smartin_at_arcis.com)
Date: 10/31/03
- Next message: Carnosaur: "Re: combinatorics question"
- Previous message: Adam Ruth: "Re: Named parameters"
- In reply to: Shea Martin: "passing a va_list to sprintf"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 31 Oct 2003 08:46:39 -0700
Shea Martin wrote:
> I have a function:
>
> void f(char* format, ...)
> {
> va_list args;
> char buf[128];
> sprintf(buf, format, args);
> printf(buf);
> }
>
> But I can't get sprintf to properly take the args I have given to f().
> I can't seem to find any examples on passing a va_list.
>
> Any help would be appreciated.
>
> Thanks.
>
> ~S
>
Thanks for the solutions, worked perfect.
~S
- Next message: Carnosaur: "Re: combinatorics question"
- Previous message: Adam Ruth: "Re: Named parameters"
- In reply to: Shea Martin: "passing a va_list to sprintf"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|