• Welcome to Valhalla Legends Archive.
 

[c++] unlimited arguments to function

Started by mentalCo., March 28, 2005, 10:33 AM

Previous topic - Next topic

mentalCo.

hey i cant find this by googling so ill ask here.  say you have a function that goes like this:


void myFunction(char * whatever, ...){
}



how do you access the variables passed after 'whatever'.

MyndFyre

Googled "variable number of arguments in C".  You could have left out "of" and "in."

Came up with:
http://publications.gbdirect.co.uk/c_book/chapter9/stdarg.html
(9th result -- others may have been there, but this one looked best from the summary page)
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Arta