/in/foo.cc: In function 'int finmaxneg(std::vector<int>&)':
/in/foo.cc:15:18: error: 'INT_MAX' was not declared in this scope
15 | int maxneg =-INT_MAX;
| ^~~~~~~
/in/foo.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
2 | #include<vector>
+++ |+#include <climits>
3 | using namespace std;
/in/foo.cc:16:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
16 | for (int j = 0; j < arr.size(); j++)
| ~~^~~~~~~~~~~~
/in/foo.cc: In function 'int findmaxpos(std::vector<int>&)':
/in/foo.cc:28:16: error: 'INT_MAX' was not declared in this scope
28 | int val = -INT_MAX;
| ^~~~~~~
/in/foo.cc:28:16: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
/in/foo.cc:31:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
31 | for (int j = 0; j < arr.size(); j++)
| ~~^~~~~~~~~~~~
/in/foo.cc: In function 'int findsecondmax(std::vector<int>&)':
/in/foo.cc:45:22: error: 'INT_MAX' was not declared in this scope
45 | arr[maxindex] = -INT_MAX;
| ^~~~~~~
/in/foo.cc:45:22: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?