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 Member

    Joined:
    Dec 28, 2010
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    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,009
    Likes Received:
    203
    Trophy Points:
    63
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice