BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: functions with parameters of varying types

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language)
View previous topic :: View next topic  
Author Message
Maynard Philbrook
Guest





PostPosted: Fri Jul 11, 2003 5:07 pm    Post subject: Re: functions with parameters of varying types Reply with quote



just make two functions of the same name with different parameters.
its called over loading.
the compiler will know which one to use by the use of your parameter types.
also you can make your function a standard C type that will accept a string
as a list of parameters that you can indicate following any number of inputs.
look for Calling conventions for that in the help.


freddy wrote:

Quote:
Hi people

I have this function I wish to estend to include also the argument "xint E"
(note that xint is simply an "array of int" type, ui64 is unsigned __int64):

void __fastcall xpow(xint B, ui64 E, xint R,...)

In practice, I wish make the funtion call with second parameter of type both
int and xint:

xpow(B,iE,R) with iE an ui64;
xpow(B,xE,R) with xE a xint;

Do you can help me?

thanks
federico


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.