Passing an undetermined amount of variables.

This is a discussion on Passing an undetermined amount of variables. within the C Programming forums, part of the General Programming Boards category; I'm looking to create a function for my parsing algorithm which acts in a manner similar to scanf and printf, ...

  1. #1
    Registered User
    Join Date
    Dec 2003
    Posts
    5

    Passing an undetermined amount of variables.

    I'm looking to create a function for my parsing algorithm which acts in a manner similar to scanf and printf, in that it can take an undetermined amount of variables.

    printf("", a, b, c, d, e, ...);

    how would I go about creating a function like this?

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,484
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems passing values from function to main variables
    By ERJuanca in forum C Programming
    Replies: 18
    Last Post: 06-12-2009, 07:13 PM
  2. Passing variables to a subroutine
    By shaig in forum C Programming
    Replies: 5
    Last Post: 03-16-2009, 06:21 PM
  3. C# in ASP.Net - Passing complex variables
    By Llam4 in forum C# Programming
    Replies: 3
    Last Post: 01-19-2008, 01:53 AM
  4. Passing variables to system() function?
    By carter192 in forum C Programming
    Replies: 5
    Last Post: 12-19-2006, 08:44 PM
  5. passing variables
    By Leeman_s in forum C++ Programming
    Replies: 3
    Last Post: 10-04-2001, 02:41 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21