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

Forum statistics

Threads
474,181
Messages
2,570,970
Members
47,536
Latest member
VeldaYoung

Latest Threads

Top