How would I write a function with an undefined number of arguments?
Like, how when using printf(), you write the string in the first argument and in the string use format identifiers. Then, for each format identifier you use is an argument specifying what should be put there in the string.
How can I do this in my own function?
I wrote my own char* concatenating function, and it would be nice if I didn't have to cc(cc(cc(cc(somevalue, another), someothervaule), somethingelse), yetmoredata);
if I need to group more than two things together. I know I could re-define the function with two, three, four, five arguments but I would really prefer to do it this way.
winrawr 9 Junior Poster
StuXYZ 731 Practically a Master Poster
ArkM 1,090 Postaholic
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
ArkM 1,090 Postaholic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.