|
Boost Users : |
From: Jim Ingram (ingramj_at_[hidden])
Date: 2006-09-09 13:40:21
Some more information:
I'm using gcc 4.0.2 on Ubuntu, with the latest available version of Boost
(for Ubuntu anyway. It's 1.32.0+1.33.0-cvs20050727). Using different
generators, such as rand48, mt11213b, or minstd_rand, has no effect; I get
different numbers, but reseeding still doesn't change them. Here is the
test code I'm using:
#include "d6.h"
#include <iostream>
#include <fstream>
int main() {
D6 die;
std::ifstream in("/dev/random");
if(!in) {
return -1;
}
unsigned long s;
in >> s;
std::cout << "Seed: " << s << std::endl;
die.seed(s);
for (int i = 0; i < 20; i++)
std::cout << die.roll() << std::endl;
}
Any ideas or suggestions would be appreciated. I'm pretty much baffled.
-- Jim
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net