I want to learn how to use boost library,and I install boost successfully.So I write a program like this.
#include "stdafx.h"
#include <boost/random/mersenne_twister.hpp>
#include <boost/random/uniform_int.hpp>
#include <boost/random/variate_generator.hpp>
int main(){
boost::mt19937 gen;
boost::uniform_int<>distribut(1, 10);
boost::variate_generator<boost::mt19937 &, boost::uniform_int<>> die(gen, distribut);
int x = die();
return 0;
}
But it shows that 1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\xutility(2715): error C4996: 'std::_Fill_n': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
And it only happens when I include the file boost/random/mersenne_twister.hpp. So I want to know how to handle this problem? If I need to use D_SCL_SECURE_NO_WARNINGS,how do I use it? Thanks.