Boost logo

Boost :

From: Jody Hagins (jody-boost-011304_at_[hidden])
Date: 2004-07-20 18:20:42


On Tue, 20 Jul 2004 16:47:34 -0500
Doug Gregor <dgregor_at_[hidden]> wrote:

>
> You don't need to build the Random library; just include the headers.

I wish that were the case. This simple program compiles, but does not
link, because the implementation is not in the header (it looks like the
implementation is in a .cpp file in the libs/random directory).

#include <iostream>
#include <boost/nondet_random.hpp>

int main(int, char *[])
{
  boost::random_device rng;
  std::cout << "Random number is " << rng() << std::endl;
  return 0;
}


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk