Thread: Passing an undetermined amount of variables.

  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 int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    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.

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, 02:53 AM
  4. Passing variables to system() function?
    By carter192 in forum C Programming
    Replies: 5
    Last Post: 12-19-2006, 09:44 PM
  5. passing variables
    By Leeman_s in forum C++ Programming
    Replies: 3
    Last Post: 10-04-2001, 02:41 PM