我正在尝试编译一个我从别人那里得到的c ++程序.它是在windows上开发的,g ++给出了一些编译错误.其中一个是
#include <random>
Run Code Online (Sandbox Code Playgroud)
这给出了以下错误:CandidateSolution.cpp:2:18: error: random: No such file or directory.我试图找到我从哪里可以得到error.h文件,但我找不到它.我怎样才能让它发挥作用?
该标头是C++ 11的新功能.尝试使用-std=c++11或-std=c++0x.另外,请确保您的编译器是最新的.