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
时间: 2024-04-27 11:22:04 浏览: 147
根据您提供的信息,编译错误原因是函数调用参数类型不匹配。函数 `GetLvKaCurDate` 的第二个参数应该是 `std::string&` 类型,而您传入的是 `char [9]` 类型。您可以将 `char [9]` 转换为 `std::string` 类型,或者重载该函数,使其接受 `char [9]` 类型的参数。
阅读全文