Results 1 to 5 of 5

Thread: Ambiguity

  1. #1

    Thread Starter
    Fanatic Member TTn's Avatar
    Join Date
    Jul 2004
    Posts
    708

    Ambiguity

    What is the easiest way to solve an ambigous call to overload?

    I am debugging an open source C++ project.
    It comes up with an ambiguous reference to 'log'.
    I believe under window.h file.
    The help index pointed this out, and possible solutions for it, but I cant seem to get them to work.

    By selecting the 'log' text, it should be easy to point it to the right way??? :

  2. #2
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949
    Hi,

    I don't see any point in raising this question in the VB.NET forum, as ambiguous overloads in VB.NET are detected at compile time and the obvious answer is remove the ambiguity. If you cannot see the ambiguity then post the offending code. Remember that overloaded procedures of the same method must differ in more respects than in an optional argument.
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

  3. #3

    Thread Starter
    Fanatic Member TTn's Avatar
    Join Date
    Jul 2004
    Posts
    708

    re-ambiguity

    Sorry you dont like me raising this question in the VB.NET forum, but I really dont understand why? The help index didn't give a concrete answer of what to do when this happens.(I Hate That)
    You've just got to know already. Like some kind of ESP.net.

    The obvious answer as you put it, must be real easy.
    "remove ambiguity" ya just do it, you say "abracadabra" and wha-la it's gone.
    I dont see it there, but here is the line of code:

    bits = (int) ((n * log(base)) / log(2) + bitlen(gk));

    Thanks for the last statement.

  4. #4
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949
    Hi,

    That code means nothing to VB.NET, at least not when I try to run it.

    Your first post referred to "ambigous call to overload" which has a specific meaning in VB.NET, which is what I answered. Once the overloaded method is located, it IS easy to remove the ambiguity. I have no idea what is happening in C++ and the correct forum is the place to post. Why do you think it will be better solved in this forum?

    You could try breaking down your code into smaller segments and finding out exactly which is the offending call.
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

  5. #5

    Thread Starter
    Fanatic Member TTn's Avatar
    Join Date
    Jul 2004
    Posts
    708

    Talking

    Wow you were a big help.
    VB.net, and C++.net both have the same ambiguous call.



    Thanks anyways.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width