passing a dynamic number of strings to a function

J

jameskuyper

Rafael said:
James Kuyper escreveu: ....

Not later... never. Not by me, not by you.

I had thought that you intended it to be decided by the user. If it
never gets decided by anyone, it's not usable.
I can't see the obvious return.

It was in my modified version of g_printf().

....
I just think printf is the best example to show how stdarg will deal
with unknow number of arguments. That makes the duplicate the most
important resource to find out if the solution fit the need or not.

It's not a very useful example without showing the unpacking of the
arguments using va_arg(), something you bypassed by using vprintf().
printf() is far too complicated to use as an example of how to unpack
the arguments; a much simpler function would make a better example.
 
R

Rafael

jameskuyper escreveu:
It's not a very useful example without showing the unpacking of the
arguments using va_arg(), something you bypassed by using vprintf().
printf() is far too complicated to use as an example of how to unpack
the arguments; a much simpler function would make a better example.

Thats where I was wondering the OP to find out more in references... but
I get your point and it is, agreed, valid.

Regards
Rafael
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,244
Latest member
cryptotaxsoftware12

Latest Threads

Top