Compile Error

foo.cc: In function 'int main()':
foo.cc:10:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   10 |  for(int i=0;i<s.size()-1;i++)
      |              ~^~~~~~~~~~~
foo.cc:11:6: error: 'a' was not declared in this scope
   11 |   if(a[i]<a[i+1])
      |      ^
foo.cc:13:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   13 |  for(int j=xb;j<s.size();j++)
      |               ~^~~~~~~~~
foo.cc:15:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   15 |  for(int x=0;x<s.size()-1;x++)
      |              ~^~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1094 5-8 留下最大数
语言
C++
递交时间
2022-07-18 14:46:32
评测时间
2022-07-18 14:46:32
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes