【发布时间】:2014-03-30 12:56:27
【问题描述】:
我将如何实际调用 std::max?该代码无法在 Visual Studio 2013 中编译,因为它采用“max”作为宏。
std::max( ... );
在“std::”之后需要一个标识符。
【问题讨论】:
-
你加入了
cmath吗?#include <cmath> -
@user9000
std::max在<algorithm>中。问题是一个顽皮的 VS 宏。