Compile Error

foo.cc:4:10: error: 'INT_MAX' was not declared in this scope
    4 | int mins=INT_MAX;
      |          ^~~~~~~
foo.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
    1 | #include<iostream>
  +++ |+#include <climits>
    2 | using namespace std;
foo.cc: In function 'int main()':
foo.cc:8:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    8 |         for(int i=0;i<s.size();i++)
      |                     ~^~~~~~~~~
foo.cc:14:18: error: 'INT_MAX' was not declared in this scope
   14 |         if(mins==INT_MAX)
      |                  ^~~~~~~
foo.cc:14:18: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
foo.cc:16:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   16 |                 for(int i=0;i<s.size()-1;i++)
      |                             ~^~~~~~~~~~~
foo.cc:20:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   20 |         for(int i=0;i<s.size();i++)
      |                     ~^~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1094 5-8 留下最大数
语言
C++
递交时间
2023-07-27 11:35:40
评测时间
2023-07-27 11:35:40
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes