"n Parameter" in C++

N

neo

I want to make one function for pass "n Parameter" with respective
functionality, "..." use for parameter but I am not understand how
use "..." in function and what is the technical name of this
technique?

Tell me some links for study "n Parameters" techniques in C++.

Regards,
-aims
 
M

mlimber

neo said:
I want to make one function for pass "n Parameter" with respective
functionality, "..." use for parameter but I am not understand how
use "..." in function and what is the technical name of this
technique?

Lookup the header <cstdarg>. The ellipsis is generally avoided in C++
because it is not typesafe. Prefer overloaded functions (see your
favorite C++ book) or method chaining (see
http://www.parashift.com/c++-faq-lite/references.html#faq-8.4 and
http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.18).
Tell me some links for study "n Parameters" techniques in C++.

Any book that covers advanced techniques in C. As I say, it is eschewed
in C++.

Cheers! --M
 
P

peter koch

neo said:

Do not thank anyone. Rethink your design as variable-length
parameterlists are an abomination in C++. Also their use is very
limited - you cant pass classes that way.

/Peter
regards,
Mohammad Omer Nasir.

[snip]
 

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,780
Messages
2,569,611
Members
45,273
Latest member
DamonShoem

Latest Threads

Top