Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <mylib.h>
- using namespace mylib;
- typedef float procType;
- struct mygen
- {
- mygen(double low, double high) : dist(low, high) {}
- double operator()() { return dist(engine); }
- private:
- std::mt19937 engine;
- std::uniform_real_distribution<> dist;
- }
- int main(int argc, char ** argv){
- static mygen instace(18.3, 18.34);
- for(int i=0; i < 10; i++){
- std::cout << " " << instace();
- }
- exit(EXIT_SUCCESS);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement