C++ lowest()不是std::numeric\u limits的成员

C++ lowest()不是std::numeric\u limits的成员,c++,gcc,qt-creator,C++,Gcc,Qt Creator,我正在尝试编译以下代码: #include <iostream> #include <limits> int main() { std::cout << std::numeric_limits<int>::lowest() << std::endl; } #包括 #包括 int main() { std::cout该函数是在C++11标准中引入的,因此您需要启用C++11与-std=C++11标志的兼容性(默认情况下未启用)

我正在尝试编译以下代码:

#include <iostream>
#include <limits>

int main()
{
    std::cout << std::numeric_limits<int>::lowest() << std::endl;
}
#包括
#包括
int main()
{

std::cout该函数是在C++11标准中引入的,因此您需要启用C++11与
-std=C++11
标志的兼容性(默认情况下未启用)。

哪个版本的GCC?您使用的是
-std=C++11
../main.cpp:5: error: 'lowest' is not a member of 'std::numeric_limits<int>'
 cout << std::numeric_limits<int>::lowest() << std::endl;
         ^