943,985 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 295
  • C++ RSS
Oct 26th, 2009
0

Extra Paramaters

Expand Post »
How do I access the paramaters entered after param1?

Like this:

void foo(param1, ...);

How do I access the ... part?
Similar Threads
Reputation Points: 9
Solved Threads: 5
Posting Pro
tomtetlaw is offline Offline
591 posts
since Sep 2008
Oct 26th, 2009
0
Re: Extra Paramaters
Why do you wanna access it?

You pass parameters to functions, you dont access them.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MasterDucky is offline Offline
16 posts
since Mar 2008
Oct 26th, 2009
0
Re: Extra Paramaters
What?
This is what I wanna do:

C++ Syntax (Toggle Plain Text)
  1. void print_something(const char *val, ...)
  2. {
  3. //the val part can have things like this in it:
  4. //%1, %2 and so forth, and then those parts get replaced by the paramaters after that.. so I wanna know how to get them.
  5. }
Reputation Points: 9
Solved Threads: 5
Posting Pro
tomtetlaw is offline Offline
591 posts
since Sep 2008
Oct 26th, 2009
0
Re: Extra Paramaters
Last edited by Dave Sinkula; Oct 26th, 2009 at 1:16 pm.
Team Colleague
Reputation Points: 2780
Solved Threads: 312
long time no c
Dave Sinkula is offline Offline
4,790 posts
since Apr 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: string to float problem
Next Thread in C++ Forum Timeline: C++ list.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC