int ii, maxnum;
for(ii=1; ii<=num-1; ii++) {
if(count[ii]>max) { // the part where I get C2872 Ambiguous Symbol error
max = count[ii]; // the part where I get C2872 Ambiguous Symbol error
maxnum = ii;
}
}
我从来没有遇到过这个错误,这真令人沮丧。
最佳答案
您的变量 max
与 std::max()
冲突。尝试使用不同的名称,它应该可以修复该错误。
关于c++ - 不明确的符号错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9475999/