Re: Why do we get ambiguity errors in c++?

manish gupta <[email protected]> Wed, 11 Feb 2009 18:57:30 +0530 (IST)
Newsgroups gmane.comp.programming.cppug
Message-ID <[email protected]>
I think, by standard you can not overload a function with premitive data types.



Thanks,

Manish.

"Don't Limit Your Challenges...Challenge Your Limits"

:)

--- On Wed, 11/2/09, Harvinder <[email protected]> wrote:
From: Harvinder <[email protected]>
Subject: [cppug] Why do we get ambiguity errors in c++?
To: [email protected]
Date: Wednesday, 11 February, 2009, 3:24 PM











    
            Hi everyone can anyone tell me

if i give 

int sum(int,int) ;

int sum(float,int) ;

int sum(float,float) ;

int sum(int,float) ;

prototypes in a pgm and give a call to sum(2,3.4);

Then an ambiguity error comes between sum(int,int) and sum(int,float) ;

WHY???



Add more friends to your messenger and enjoy! Go to http://messenger. yahoo.com/ invite/



[Non-text portions of this message have been removed]




 

      

    

           
  
    
	
	 
	
	








	


	
	


      Connect with friends all over the world. Get Yahoo! India Messenger at http://in.messenger.yahoo.com/?wm=n/

[Non-text portions of this message have been removed]



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/cppug/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/cppug/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/