any other method by which i can pass variable no. of arguments to a function :)
Santi1986 0 Newbie Poster
Recommended Answers
Jump to PostPass an array.
Jump to Posti know one method is thru va_arg related macros...is there any other method....wot wud u do...if the code skeleton looks something like this...
int sum_fun(int num_arg,...) { .... ... ... } main() { printf("%d",sum_fun(4,4,5,6,7)); printf("%d",sum_fun(8,1,2,3,4,5,6,9,10)); ... .. .. }
If you're using the
...
notation for variable …
All 5 Replies
Narue 5,707 Bad Cop Team Colleague
N1GHTS 102 Posting Whiz in Training
Santi1986 0 Newbie Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
Narue 5,707 Bad Cop Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.