linux的编译器opions [英] compiler opions for linux
本文介绍了linux的编译器opions的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <random>
int main ( int argc , char ** argv ) {
std::random_device rd;
std::mt19937_64 gen(rd());
std::uniform_real_distribution<> dis(0, 1);
std::cout << dis(gen) << std::endl;
return 0;
}
我在Linux上使用c ++中的随机库,但是这个编译器选项
I am using the random library in c++ on linux, but this compiler options
"g++ code.cpp -o code.exe -std=c++0x"
因随机变量生成器mt19937_64而无效/>
这是错误:
doesn't work because of the generator of random variables "mt19937_64"
this is the error:
erreur: ‘mt19937_64’ is not a member of ‘std’
推荐答案
当我使用版本编译器时编译没有问题gcc / 4.7.2
谢谢。
it compiles without problems when I use the version compiler gcc/4.7.2
Thank you.
这篇关于linux的编译器opions的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文