记录详情

Compile Error

foo.cc: In function 'int FindMaxNeg(int*, int)':
foo.cc:3:18: error: 'INT_MIN' was not declared in this scope
    3 |     int maxNeg = INT_MIN;
      |                  ^~~~~~~
foo.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; did you forget to '#include <climits>'?
    1 | #include <iostream>
  +++ |+#include <climits>
    2 | int FindMaxNeg(int arr[], int size) {
foo.cc: In function 'int main()':
foo.cc:26:20: error: 'INT_MIN' was not declared in this scope
   26 |     if (maxNegA == INT_MIN) {
      |                    ^~~~~~~
foo.cc:26:20: note: 'INT_MIN' is defined in header '<climits>'; did you forget to '#include <climits>'?
foo.cc:32:20: error: 'INT_MIN' was not declared in this scope
   32 |     if (maxNegB == INT_MIN) {
      |                    ^~~~~~~
foo.cc:32:20: note: 'INT_MIN' is defined in header '<climits>'; did you forget to '#include <climits>'?
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A9-3 数组中最大的负数
比赛
2023 程序设计与竞赛(作业5:从数组看集体)
语言
C++
递交时间
2023-10-21 23:54:18
评测时间
2023-10-21 23:54:18
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes