std::uniform_int_distribution max() method in C++ with examples
The max() method of uniform_int_distribution class in C++ is used to get the maximum possible value that can be generated by this uniform_int_distribution.
result_type max() const;
Parameters: This method do not accepts any parameters.
Return Value: This method return the maximum possibly generated value in this uniform_int_distribution.
a = 10, b = 100;
> distribution(a, b);
"Max value that can be generated"
" by this uniform_int_distribution: "
<< distribution.max() << endl;
Max value that can be generated by this uniform_int_distribution: 100
Attention reader! Don’t stop learning now. Get hold of all the important C++ Foundation and STL concepts with the C++ Foundation and STL courses at a student-friendly price and become industry ready.