TIP: Click on subject to list as thread! ANSI
echo: nthelp
to: Paul Ranson
from: Geo
date: 2004-12-06 18:58:38
subject: Re: c++ help

From: "Geo" 

Ok I'll take your word for it (I did what you suggested and it does indeed
initialize it and remains random for each push of the button).

I have no idea how to create threads though so a lot of what you said went
over my head.

Geo.

"Paul Ranson"  wrote in message
news:41b4e282{at}w3.nls.net...
> The 'OnPlay3' function is called every time you press the button it's
mapped
> to. All the MFC stuff is happening on a single thread so you can safely
call
> 'srand' elsewhere and not need to again.
>
> The library random number generator has its own private state that cares
> little for your classes and functions, but it gets a new copy for each
> thread. Your program is single threaded, so no problem.
>
> Paul

--- BBBS/NT v4.01 Flag-5
* Origin: Barktopia BBS Site http://HarborWebs.com:8081 (1:379/45)
SEEN-BY: 633/267 270 5030/786
@PATH: 379/45 1 396/45 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.