Ambiguous method call: both 'MbBaseInfoServiceImpl.exportNoShopFill(List<FindPageMemberVo>)' and 'MbBaseInfoServiceImpl.exportNoShopFill(List<FindPageMemberVo>)' match
时间: 2024-04-02 07:33:06 浏览: 8
这个错误提示表明在调用 MbBaseInfoServiceImpl 类的 exportNoShopFill 方法时出现了二义性,因为 MbBaseInfoServiceImpl 类中存在两个方法签名相同的 exportNoShopFill 方法,编译器无法确定应该调用哪一个方法。你需要检查代码,确保每个方法的参数类型不同,或者给方法取不同的名称以消除二义性。
相关问题
Ambiguous method call: both 'MbBaseInfoServiceImpl.exportShopFill(List<FindPageMemberVo>, List<QueryShopBaseInfoListVO>)' and 'MbBaseInfoServiceImpl.exportShopFill(List<FindPageMemberVo>, List<QueryShopBaseInfoListVO>)' match
这错误提示表明在 MbBaseInfoServiceImpl 类中,有两个方法的签名完全相同,都是 exportShopFill(List<FindPageMemberVo>, List<QueryShopBaseInfoListVO>),所以编译器无法确定应该调用哪个方法。你需要检查这两个方法,确认它们确实是不同的方法,可能是参数类型或参数数量不同。如果这两个方法确实是重复的,你需要在其中一个方法中修改方法签名,使它们不再完全相同。
[Error] ambiguous overload for 'operator=' (operand types are 'std::string {aka std::basic_string<char>}' and 'std::basic_istream<char>')
这个错误是因为你试图将一个 `std::basic_istream<char>` 类型的对象赋值给一个 `std::string` 类型的对象,而 `std::string` 类型的赋值运算符并不支持这种操作。
可能是因为你在尝试从输入流中读取数据,并将其赋值给一个字符串对象,但是你使用了错误的赋值语法。正确的做法是使用输入流的读取函数来读取数据,然后将其存储到一个字符串对象中。
例如,下面的代码可以从标准输入流中读取一行文本,并将其存储到一个字符串对象中:
```c++
#include <iostream>
#include <string>
int main() {
std::string input;
std::getline(std::cin, input);
std::cout << "Input: " << input << std::endl;
return 0;
}
```
在这个例子中,`std::getline()` 函数从 `std::cin` 输入流中读取一行文本,并将其存储到 `input` 字符串对象中。这个函数会自动处理字符串的长度和换行符等细节,因此你不需要担心这些问题。