Exact Match

This is a discussion on Exact Match within the C++ Programming forums, part of the General Programming Boards category; Overloaded fxns. void afunc(int); void afunc(double); afunc(0); My book says the mathching (to check which fxn to use), is not ...

  1. #1
    Aspiring "Software Guy"
    Join Date
    Aug 2005
    Posts
    46

    Exact Match

    Overloaded fxns.

    void afunc(int);
    void afunc(double);

    afunc(0);

    My book says the mathching (to check which fxn to use), is not ambiguous.
    Is it really not?

  2. #2
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    afunc(0) would call the int version, whole numbers are assumed to be ints unless they have a modifier after them like 0f. Also, please call it a function, the extra typing isn't much and it took me a minute to understand what you meant. Another thing is your spelling, if you have a hard time with English spelling use a browser that has a built in/plugin spell check.

  3. #3
    Aspiring "Software Guy"
    Join Date
    Aug 2005
    Posts
    46
    Your help is appreciated

    Plugin teached me english too! (LOL)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 03-30-2009, 06:37 PM
  2. no match for 'operator>>'
    By Taka in forum C++ Programming
    Replies: 3
    Last Post: 03-30-2009, 12:17 AM
  3. No Match For Operator+ ???????
    By Paul22000 in forum C++ Programming
    Replies: 24
    Last Post: 05-14-2008, 10:53 AM
  4. Function validation.
    By Fhl in forum C Programming
    Replies: 10
    Last Post: 02-22-2006, 07:18 AM
  5. 2 array match
    By ajastru2000 in forum C++ Programming
    Replies: 5
    Last Post: 07-18-2003, 07:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21