c++11 - Defining a Discrete Probability Distribution in C++ -


i have been trying create own discrete distribution in visual studio (c++). kept getting same error. tried example code from: http://www.cplusplus.com/reference/random/discrete_distribution/discrete_distribution/.

again, same error appeared example code.

the line of code (from link) giving me error is:

std::discrete_distribution second(init.begin(), init.end()); 

particularly, init.begin() underlined in red.

the 2 errors follows:

error c2661: 'std::discrete_distribution::discrete_distribution' : no overloaded function takes 2 arguments  intellisense: no instance of constructor "std::discrete_distribution<_ty>::discrete_distribution [with _ty=int]" matches argument list argument types are: (std::_array_iterator, std::_array_iterator)  

why compiler not work? wondering if other people getting same errors? updated version of visual studio make sure wasn't old bug

the problem due bug in vs express 2013. installing vs community 2015, error message vanished.


Comments

Popular posts from this blog

java - Solr query version issue: Invalid version or the data in not in 'javabin' format -

Hard vs. Soft Water: What's The Difference?

The Ten Most Livable Cities In The World