CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11

Thread: strange error!

Threaded View

  1. #1
    Join Date
    Sep 2007
    Location
    Calcutta, India
    Posts
    95

    strange error!

    I will give out snippets of the production level code in my current project (regardless of the legal, moral, ethical, mathematical and political correctness of doing so).

    The is a class having a function:

    Code:
    class bu_tde_mti_base:public some_class
    {
    ...
    public:
    virtual inline void
    set( const bu_mti_typ_e mti_typ )
    }
    bu_mti_typ_e is an enum type.

    There is another class:
    Code:
    class bu_tde_mti : public bu_tde_mti_base
    {
    ...
    }
    The there is some code:

    Code:
    bool
    if_cup_intf::build_fld_070( some params,
                                              const bu_tde_mti &mti,
                                              more params)
        {
         ...
         mti.set( mti_netwk_mgmt_rqst_resp );
         }
    This code is getting the following error:

    Code:
    Could not find match for bu_tde_mti_base::set(bu_mti_typ_e mti_typ) needed in function
    if_cup_intf::build_fld_070(…)
    Two of us senior programmmers have tried doing something about it, to no avail. So definitely I would like help in solving this error.

    But even before we start, can someone explain to me how the compiler pinpoints the exact level in the three-level hierarchy where it is expecting the function? It's denitely not psychic???

    We are trying to compile this in a Sun box.

    $uname -a
    SunOS oma3s016 5.10 Generic_120011-14 sun4u sparc SUNW,Sun-Fire-880
    $

    the compiler is SunWSPro CC.

    PLEAAASE HELP!

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

    I tried casting the parameter of the call to a const since I saw the const missing from what the compiler is trying to look for. This time it gave the same error but for a formal parameter of "const int". And what more, the set function IS overloaded for a const int formal argument..
    Last edited by indrajit_p1; November 10th, 2008 at 01:26 AM. Reason: Additional points

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

Featured