How to pass variable argument list to another function w/ variable argument list?

Discussion in 'C Programming' started by Ben Kial, Nov 15, 2004.

  1. Ben Kial

    Ben Kial Guest

    I'd like to write a wrapper function "mysprintf(char *buffer, char *format,
    ....)" which calls sprintf(). My question is how can I pass variable argument
    in mysprintf() to sprintf().

    Thanks in advance...

    Ben
     
    Ben Kial, Nov 15, 2004
    #1
    1. Advertising

  2. Ben Kial

    Eric Enright Guest

    Ben Kial wrote:
    > I'd like to write a wrapper function "mysprintf(char *buffer, char *format,
    > ...)" which calls sprintf(). My question is how can I pass variable argument
    > in mysprintf() to sprintf().


    Check out vsprintf().

    --
    Eric Enright /"\
    ericAtiptsoftDcom \ / ASCII Ribbon Campaign
    X Against HTML E-Mail
    Public Key: 0xBEDF636F / \
     
    Eric Enright, Nov 15, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. S?ren Gammelmark
    Replies:
    1
    Views:
    1,984
    Eric Sosman
    Jan 7, 2005
  2. Reckoner
    Replies:
    11
    Views:
    736
    Steven D'Aprano
    Jan 19, 2009
  3. DSF
    Replies:
    5
    Views:
    841
    Tim Rentsch
    Feb 4, 2010
  4. AikidoGuy
    Replies:
    11
    Views:
    593
    Seebs
    Nov 21, 2011
  5. Replies:
    8
    Views:
    130
Loading...

Share This Page