step3/SaddlePoint.cpp: In function ‘int main()’: step3/SaddlePoint.cpp:20:36: error: ‘INT_MIN’ was not declared in this scope std::vector<int> row_max(rows, INT_MIN); ^~~~~~~ step3/SaddlePoint.cpp:20:36: note: suggested alternative: ‘INT8_MIN’ std::vector<int> row_max(rows, INT_MIN); ^~~~~~~ INT8_MIN step3/SaddlePoint.cpp:21:36: error: ‘INT_MAX’ was not declared in this scope std::vector<int> col_min(cols, INT_MAX); ^~~~~~~ step3/SaddlePoint.cpp:21:36: note: suggested alternative: ‘INT8_MAX’ std::vector<int> col_min(cols, INT_MAX); ^~~~~~~ INT8_MAX
时间: 2024-02-10 22:30:33 浏览: 132
抱歉,看起来出现了一些问题。`INT_MIN`和`INT_MAX`是定义在`<climits>`头文件中的常量,表示`int`类型的最小值和最大值。请确保在代码开头添加以下`#include`语句:
```cpp
#include <climits>
```
添加了这个头文件后,编译器就能正确识别`INT_MIN`和`INT_MAX`了。如果您已经添加了这个头文件但仍然遇到问题,请检查编译环境是否正常。
我希望这次能解决问题。如果您还有其他疑问,请随时提问。
阅读全文