|
-
February 8th, 2009, 06:17 AM
#1
about function
how many arguments we can pass to a function i need it in number plaese any body help me out
-
February 8th, 2009, 01:14 PM
#2
Re: about function
Which function do you have in mind?
-
February 8th, 2009, 01:46 PM
#3
Re: about function
You have a lot of basic questions. I think you should go and look up some C++ tutorials online or get a beginner C++ book.
-
February 9th, 2009, 08:04 AM
#4
Re: about function
Hi munigantipardhu,
how many arguments we can pass to a function i need it in number plaese any body help me out
Actually there is no limit. You can pass as many as argument you want.
Even in C and C++, you do not have to mention in the Signature of the function.
Ex:
Signature of function could be like this;
int TestFunction ( int total_no_of_argument, ... )
{
//use the total_no_of_argument to iterate through all the arguments
//for this you have to read va_start, va_list and va_arg macros
}
And can call the above function as;
1. TestFunction (5, 1, 2, 3, 4, 5 );
2. TestFunction (10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 );
3. As many as argument you want
Regards
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|