Hello Jim!

Sorry if you missed my earlier response.

On Wed, Jan 26, 2011 at 12:42 AM, Jim Michaels <[email protected]> wrote:
> yeah, forgot to post to newsgroup. sorry.   Kai, what is this?  is this
> compiler bug or user error?

User error.  See below.

> ...
> ________________________________
> From: Jim Michaels <[email protected]>
> To: K. Frank <[email protected]>
> Sent: Tue, January 25, 2011 3:56:07 PM
> Subject: Re: [Mingw-w64-public] problem with tr1/random?
>
> oh, I forgot to tell you, I had the line, using namespace std;
> #include <tr1/random>
> using namespace std;
>             //do mersenne twister random number generator
>             std::tr1::random_device rd();

(from my earlier post)

> I think this line is your problem:
>
>   std::tr1::random_device rd();   //  <-- trouble!
>
> This declares a function (called rd) that returns a
> random_device.  It does not default-construct an
> instance of a random_device.
>
> This is a common and pernicious c++ pitfall.  Scott
> Meyers calls it "c++'s most vexing parse."  There's
> a faq for it:
>
>   http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.2

If you can't get it to compile after making the above
correction, please post a minimal but complete example
(a single translation unit that should compile -- for this
issue, it doesn't need to include "main"), and we should
be able to knock it into shape for you.


Good luck.


K. Frank

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to