A question about variable-argument lists

C

curiosity5374

A function foo is defined as:
int foo(string, ...);

How to determine there are how many arguments in the list?
 
M

Mike Wahler

A function foo is defined as:
int foo(string, ...);

How to determine there are how many arguments in the list?

The function needs to be told the number
and types of arguments (e.g. by the caller
via another argument). That's how 'printf()'
does it.

-Mike
 

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
474,263
Messages
2,571,064
Members
48,769
Latest member
Clifft

Latest Threads

Top