1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

urgent doubt

Discussion in 'C' started by jainprateek2000, Mar 28, 2011.

  1. jainprateek2000

    jainprateek2000 New Member

    Joined:
    Aug 24, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    In the case of function overloading , please can someone explain how we can distinguish between integer and float values as arguments????? I mean how will the compiler know we want to give integer or float value????
     
  2. kyle

    kyle New Member

    Joined:
    Dec 28, 2010
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    don't have 1
    Location:
    i live in Italy,Milano
    it doesn't know anything, the compiler knows nothing unless you make it clear and define everything.
     
  3. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    The compiler will throw an error if it can't resolve a call due to ambiguity.
     

Share This Page