piyush
piyush

Reputation: 21

argument mismatch error in c++ code

I have three file first one is bmptktevent.h second one is bmptktevent.c and third one is sbsngenerator.pC file . I have to add one attribute IPAddr. And I have added the IPAddr in these three file but when i am compiling this it is giving the error

SbsnEvtGenerator.C", line 2107: Error: Could not find a match for BMPTktClearanceEvt::BMPTktClearanceEvt(const cpInstanceId, cpAttrClone, cpAttrClone, cpAttrClone, cpAttrClone, cpAttrClone, cpAttrClone, cpAttrClone, cpAttrClone, cpAttrClone, cpAttrClone, cpAttrClone, cpAttrClone, cpAttrClone, cpAttrClone, cpAttrClone, cpAttrClone, cpAttrClone, const cpAttribute, const cpAttribute, const cpAttribute, const cpAttribute, cpAttribute, cpAttribute, cpAttribute, cpAttribute, cpAttribute*, cpAttribute*, cpAttribute*, cpAttribute*, cpAttribute*, cpAttribute)

I am attaching the three file. kindly help me to come out this problem. I have made changes in these three file. first one is

SbsnEvtGenerator.pC 
cpAttribute *IPAddr = _grabAttr( extraAttrs, BMPMO_IPAddress);

case IPAddressChangeEvt :
        {
            supTDO << setdl( TKT_TR_INFO ) << "Trying to "
            << "create a IPAddressChangeEvt object..."
            << endsup;

            FailIfAttrIsNull( IPAddr, BMPMO_IPAddress );

            tktEvt = new BMPTktIPAddressChangeEvt(
                    // S.Liou 01/13/98 : bmp980015.04
                    //  trblTktId, acMCN, acTktSrc,
                    trblTktId, acMCN,
                    acCGWSbsnValue, acserviceCode, 
                    actier1, actier2, actos, acbesban,
                    accustIdType, accustIdValue,acIPCustId,acDomainName, //EM_LOCAL_2
                    acserviceIdType,accustTicketNumber,acbridgeSysTktId,
                     acTktSrc,    //bmp021267.08
                    // End of bmp980015.04 [S.Liou]
                    *atLoginId, *atWkCtrId,
                    //Sameer...bmp983284.11
                                            attrAutoIndicator,
                    *IPAddr );

in bmptkt event.h

class BMPTktIPAddressChangeEvt: public BMPTktEvent
{
public:
BMPTktIPAddressChangeEvt()
  {type=IPAddressChangeEvt;}
BMPTktIPAddressChangeEvt(const cpInstanceId& tktId,
    const cpAttribute& MCN,
    const cpAttribute& cgwSbsn, //bmp980015
    const cpAttribute& serviceCode, // bmp011771
    const cpAttribute& tier1, // bmp011771.05
    const cpAttribute& tier2, // bmp011771.05
    const cpAttribute& typeOfService,   //ASV R23.0  //bmp020785.06
    const cpAttribute& BESBAN, // R24.0 EM Local #bmp021233.23
    const cpAttribute& CustIdType,  //EM_LOCAL_2
    const cpAttribute& CustIdValue, //EM_LOCAL_2
    const cpAttribute& IPCustId,
            const cpAttribute& DomainName,
    const cpAttribute& serviceIdType, //IP Cable #bmp021267    R24.0
    const cpAttribute &custTicketNumber,
    const cpAttribute &bridgeSysTktId,
    const cpAttribute& srcSys, const cpAttribute& loginId,
    const cpAttribute& workCenter,
    const cpAttribute& autoInd,  //Sameer...bmp983284.14
    const cpAttribute& IPAddr ) ;
};

and in bmptktevent.C

Upvotes: 2

Views: 190

Answers (1)

Xeo
Xeo

Reputation: 131789

Error: Could not find a match for BMPTktClearanceEvt::BMPTktClearanceEvt( [...] cpAttribute, cpAttribute*, cpAttribute*, cpAttribute*, cpAttribute*, cpAttribute*, cpAttribute)

Notice how the sixth to second last are pointers. You're not dereferencing enough:

// these are the last 6 parameters you're passing:
acbridgeSysTktId,
acTktSrc,    //bmp021267.08
// End of bmp980015.04 [S.Liou]
*atLoginId, *atWkCtrId,
//Sameer...bmp983284.11
attrAutoIndicator,
*IPAddr

See if any of those are double pointers. Also, the first few parameters you're actually passing are cpAttrClone. Are those implicitly convertible to cpAttribute? If not, that's also a source of error.

Upvotes: 3

Related Questions