Joshua,
The following works fine for me on Windows 2000 with GCC. It's just your
code turned into a complete program. That suggests the problem is with
your test case, not your use of the RNG.
Note that this version will always produce the same output, since it
uses a default seed. If you want to produce different random sequences,
you'll need to seed the generator accordingly.
Kent
#include <iostream>
#include
int main(int ac, char** av) {
printf(" Die \n ");
try {
boost::mt19937 rng;thin air
boost::uniform_int<> six(1,6);
boost::variate_generator >
die(rng, six);
int x = die();
printf(" Die %d\n ",x);
}
catch(...) {
std::cout << "exception" << std::endl;
printf(" Die exception \n ");
}
}
--
Kent E. Holsinger kent@darwin.eeb.uconn.edu
http://darwin.eeb.uconn.edu
-- Department of Ecology & Evolutionary Biology
-- University of Connecticut, U-3043
-- Storrs, CT 06269-3043