Raised This Month: $ Target: $400
 0% 

va_list function passing argument


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
raydan
Senior Member
Join Date: Aug 2006
Old 02-25-2011 , 08:28   va_list function passing argument
Reply With Quote #1

Code:
bool testfuc(void *in1, void *in2, ...)
{
  va_list arg;
  va_start(arg, in2);
  ...
  va_end(arg);
  return true;
}
 
// code 1
testfuc(NULL, NULL, 1, 2, 3);
 
// code 2
void *pp = &some_int;
testfuc(NULL, NULL, "a", pp, anotherint, 0.5f);
 
//code 3
testfunc(NULL, NULL, p3);
question is:
in code 3, how to pack/pass or do something to "p3", make the result same as code 1 & code 2?
raydan is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:55.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode