kkkj0410   2년 전

In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,

from /usr/include/c++/4.9/ios:40,

from /usr/include/c++/4.9/ostream:38,

from /usr/include/c++/4.9/iostream:39,

from 1:

/usr/include/c++/4.9/bits/stl_algobase.h: In instantiation of 'const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':

13:53: required from here

/usr/include/c++/4.9/bits/stl_algobase.h:264:26: error: '__comp' cannot be used as a function

if (__comp(__a, __b))

위 글이 뜨면서 에러 나는데 왜 그런지 모르겠습니다.

djm03178   2년 전

max는 3개 이상의 인자를 주고 최댓값을 구하게 할 수 없습니다. 대신 중괄호로 감싼 하나의 인자를 주는 버전이 있습니다.

댓글을 작성하려면 로그인해야 합니다.