How to use a function with variable number of arguments

E

EricLin

Dear all:

I am just concerned about how to use a function with variable number
of arguments. for example:

int TestFunction(arguments)
{
....
Testing contents...
}

The number of arguments will change every time I call TestFunction().

Thanks.

Yuncheng
(e-mail address removed)
 
E

Ed Morton

EricLin said:
Dear all:

I am just concerned about how to use a function with variable number
of arguments. for example:

int TestFunction(arguments)
{
...
Testing contents...
}

The number of arguments will change every time I call TestFunction().

Thanks.

Yuncheng
(e-mail address removed)

Read the FAQ on variable length arguments:

http://www.eskimo.com/~scs/C-faq/s15.html

and the relevant chapter of your C book then come back if you have any
questions.

Ed>
 
E

E. Robert Tisdale

EricLin said:
I am just concerned about how to use a function
with variable number of arguments. for example:

int TestFunction(arguments) {
...
Testing contents...
}

The number of arguments will change every time I call TestFunction().

It's a Frequently Answered Question (FAQ)
15. Variable-Length Argument Lists

http://www.eskimo.com/~scs/C-faq/s15.html
 

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
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top