https://notepad96.tistory.com/57

 

C++ min, max 함수

1. min, max, minmax min, max, minmax는 algorithm 라이브러리의 구현되어 있는 함수이다. 각 함수들은 두 값을 비교하여 더 작은 값, 더 큰 값을 반환해 준다. 위 함수는보통 2개의 값만 비교하여 최대값, 최

notepad96.tistory.com

https://notepad96.tistory.com/40

 

C++ Vector 최대값, 최소값, 인덱스 구하기

1. 최대값, 최소값 vector 컨테이너에서 최대값, 최소값을 구할 경우 for문을 작성할 수도 있지만 이는 복잡하다. 그래서 algorithm 라이브러리의 있는 max_element를 사용한다면 한줄로도 간단하게 최대

notepad96.tistory.com

 

+ Recent posts