munigantipardhu
February 8th, 2009, 05:17 AM
how many arguments we can pass to a function i need it in number plaese any body help me out
|
Click to See Complete Forum and Search --> : about function munigantipardhu February 8th, 2009, 05:17 AM how many arguments we can pass to a function i need it in number plaese any body help me out laserlight February 8th, 2009, 12:14 PM Which function do you have in mind? Notsosuperhero February 8th, 2009, 12:46 PM 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. bidesh February 9th, 2009, 07:04 AM 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 codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |