c++ - 不明确的符号错误?

标签 c++ compiler-errors

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

我从来没有遇到过这个错误,这真令人沮丧。

最佳答案

您的变量 maxstd::max() 冲突。尝试使用不同的名称,它应该可以修复该错误。

关于c++ - 不明确的符号错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9475999/

相关文章:

java - Compiler throw non static method cannot accessed from static context 当没有问题

c - 警告不被视为错误 -Wall & -Werror on

c++ - 重载比较运算符 == C++

c++ - 输出不是预期的

c++ - 来自 C++ 中另一个类的枚举(使用 SFML)

c++ - 在 C++ 中重载一元运算符有困难吗?

c++ - C/C++ 创建一个带有负值的枚举,而不必对其编号

c++ - 并行处理碰撞对

c++ - XPATH与XSLPattern向后兼容

c++ - 此代码中没有匹配的调用函数