Program Help

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: Program Help

 
0
  #11
Sep 24th, 2007
You might be calling srand(), but I don't see any code calling rand() as yet.
Post your latest code.

> It seems you have to change the srand value from srand ( time(NULL) );
> to srand (1); after rolling the die.
Calling srand(time(NULL)); just ONCE at the start of the program is usually sufficient to change things around from one run to another.
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 11
Reputation: NicAuf is an unknown quantity at this point 
Solved Threads: 0
NicAuf NicAuf is offline Offline
Newbie Poster

Re: Program Help

 
0
  #12
Sep 24th, 2007
Its pretty much unchanged as the first code i posted. I am completely lost, and I'm at wits end.
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: Program Help

 
0
  #13
Sep 24th, 2007
But you've just claimed you've been calling rand(), yet I see no evidence of it.
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 47
Reputation: teppuus is an unknown quantity at this point 
Solved Threads: 0
teppuus's Avatar
teppuus teppuus is offline Offline
Light Poster

Re: Program Help

 
0
  #14
Sep 25th, 2007
How's it going NicAuf? Were you able to figure out your code? Salem wants you to show all your code (if you are having problem with the die rolling, then you have more code than you are showing). It's the best way ppl can help. Don't give up!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC