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

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -