gpt4 book ai didi

c++ - C++代码中的参数不匹配错误

转载 作者:搜寻专家 更新时间:2023-10-31 01:55:19 26 4
gpt4 key购买 nike

我有三个文件,第一个是 bmptktevent.h,第二个是 bmptktevent.c,第三个是 sbsngenerator.pC 文件。我必须添加一个属性 IPAddr。我在这三个文件中添加了 IPAddr 但是当我编译它时它给出了错误

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)

我附上了三个文件。请帮我解决这个问题。我已经对这三个文件进行了更改。第一个是

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 );

在 bmptkt 事件.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 ) ;
};

在 bmptktevent.C 中

最佳答案

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

注意倒数第六个到第二个是指针。你没有足够的取消引用:

// 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

看看其中是否有任何一个是双指针。此外,您实际传递的前几个参数是 cpAttrClone。这些是否可以隐式转换为 cpAttribute?如果不是,那也是错误的来源。

关于c++ - C++代码中的参数不匹配错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8585255/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com