prototype for 'int CPLCXProcess::InsertIntoPLTradeReg(oracle::occi::Connection*, std::string, std::string, std::string, XHX_PLCX_PACKBODY*)' does not match any in class 'CPLCXProcess'
时间: 2023-09-15 13:16:31 浏览: 44
这个错误提示是说在类 'CPLCXProcess' 中没有找到与 'int CPLCXProcess::InsertIntoPLTradeReg(oracle::occi::Connection*, std::string, std::string, std::string, XHX_PLCX_PACKBODY*)' 匹配的原型。这通常是因为你在类中声明了函数,但是函数的参数列表或返回值与实际实现的不同。
你需要检查 'CPLCXProcess' 类中是否已经声明了 'InsertIntoPLTradeReg' 的原型,并确保其参数列表和返回值类型与实际实现的一致。另外,确保在类外定义该函数时也要与其原型一致。如果问题仍然存在,请检查是否存在命名空间问题或其他语法错误。
相关问题
PLCXProcess.cpp: In member function 'int CPLCXProcess::tradewithxhx(oracle::occi::Connection*, std::string, std::string, std::string, std::string&, std::string&)': PLCXProcess.cpp:4196:63: error: no matching function for call to 'CPLCXProcess::getLvkaStat
根据你的问题,我猜测你遇到了编译错误。这个错误的意思是在 `CPLCXProcess` 类的 `tradewithxhx` 成员函数中,调用了一个名为 `getLvkaStat` 的函数,但是编译器找不到这个函数的匹配项。
有几种可能的原因导致这个错误:
1. `getLvkaStat` 函数没有被定义:请检查你的代码,确保在 `CPLCXProcess` 类的定义中有 `getLvkaStat` 函数的实现。
2. `getLvkaStat` 函数的参数不匹配:请检查你调用 `getLvkaStat` 函数的代码,确保传递给函数的参数类型和数量与函数定义中的参数类型和数量匹配。
3. `getLvkaStat` 函数在 `CPLCXProcess` 类的定义之外定义了:如果 `getLvkaStat` 函数不是 `CPLCXProcess` 类的成员函数,那么你需要在调用它的代码中提供正确的命名空间或者包含相应的头文件。
希望这些提示能够帮助你找到问题所在。
PLCXProcess.cpp: In member function 'int CPLCXProcess::InsertIntoPLTradeReg(oracle::occi::Connection*, std::string, std::string, std::string, XHX_PLCX_PACKHEAD*)': PLCXProcess.cpp:2579:51: error: no matching function for call to 'CPLCXProcess::GetLvKaCurDate(oracle::occi::Connection*&, char [9], const char [3])' if (0 != GetLvKaCurDate(pConn, strLocalDate, "99"))//lvka_statelocal_cur_date ^ PLCXProcess.cpp:2579:51: note: candidate is: In file included from PLCXProcess.cpp:9:0: PLCXProcess.h:156:6: note: int CPLCXProcess::GetLvKaCurDate(oracle::occi::Connection*, std::string&, std::string) int GetLvKaCurDate(Connection* pConn, string& strLvKaDate, string strProvinceCode); ^ PLCXProcess.h:156:6: note: no known conversion for argument 2 from 'char [9]' to 'std::string& {aka std::basic_string<char>&}' make: *** [PLCXProcess.o] Error 1
根据您提供的信息,编译错误原因是函数调用参数类型不匹配。函数 `GetLvKaCurDate` 的第二个参数应该是 `std::string&` 类型,而您传入的是 `char [9]` 类型。您可以将 `char [9]` 转换为 `std::string` 类型,或者重载该函数,使其接受 `char [9]` 类型的参数。