강의

멘토링

커뮤니티

Inflearn Community Q&A

yy9612093517's profile image
yy9612093517

asked

Let's learn C and C++ at the same time - Doodle Doodle's C/C++

Lesson 53. Namespace

visual studio 2019버전 max함수 헤더파일없이

Written on

·

604

0

안녕하세요
원래 max함수를 쓰기위해 include<algorithm>을 헤어파일에 입력해야 STL함수 max()함수를 쓸수있다고 알고있는데 
2019년도 버전은 왜
#include <iostream>
using namespace std;
int main() {
cout << "더 큰건 " << max(1, 2) << "입니다." << endl;
}
이렇게만해도 컴파일이 되는지 궁금합니다
c++알고리즘C++cmax함수

Answer 1

0

max 함수는 algorithm 헤더파일 외에도 기본으로 참조되는 utility 헤더파일에도 존재합니다

yy9612093517's profile image
yy9612093517

asked

Ask a question