Problem minimum
User wongethan8192
Submission Time 2023-03-05 08:23:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minimum.cpp: In function ‘int findMin(int, int*)’:
minimum.cpp:5:11: error: ‘begin’ was not declared in this scope
5 | for(int i:A)if(i<min)min=i;
| ^
minimum.cpp:2:1: note: ‘std::begin’ is defined in header ‘<iterator>’; did you forget to ‘#include <iterator>’?
1 | #include "minimum.h"
+++ |+#include <iterator>
2 | using namespace std;
minimum.cpp:5:11: error: ‘end’ was not declared in this scope
5 | for(int i:A)if(i<min)min=i;
| ^
minimum.cpp:5:11: note: ‘std::end’ is defined in header ‘<iterator>’; did you forget to ‘#include <iterator>’?