이유는 프로그램이 1표준 : : 벡터 및 표준 : 분의 행동
#include <vector>
#include <algorithm>
#include <iostream>
int main (int argc, char **argv) {
std::vector<int> test;
test.push_back(INT_MAX);
test.push_back(1);
int min = *(std::min(test.begin(), test.end()));
std::cout << "Minimum = " << min << std::endl;
}
그것은 2147483647
아, 이것은 거의 그가 원하는 것입니다. – GManNickG
'std :: min_element()'의 반환 값은 반복자이므로 역 참조가 필요합니다. – hmjd
@hmjd 네, 맞습니다. – FailedDev