l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2003 Mar 13 10:02

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] DDD confusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] DDD confusion

I figured it out. I apologize for the ambiguous post. 

I was calling srand(time(NULL)) inside a loop on accident so when I
stepped through the code line by line in DDD, the time changed a little
bit, changing the seed. However this was not the case when it my program
rand and completed in less than a second.

So: If anything weird starts happening and you are using srand(). First
make sure you've got srand() in the right place.


On Wed, 2003-03-12 at 20:25, Peter Jay Salzman wrote:
> begin Ryan <rcdetert@ucdavis.edu> 
> > I'm trying to debug some code I've written using DDD. When I step
> > through the code one line at a time or use breakpoints at all, I get the
> > correct behavior, however, when I run the program from the console or
> > run it in ddd without any break points, the results are wrong. There is
> > some random number generation in my code, but other than that I don't
> > know what could be causing the difference in behavior.
> > 
> > -ryan
> what exactly are you asking?
> pete
> -- 
> First they ignore you, then they laugh at you, then they fight you,
> then you win. -- Gandhi, being prophetic about Linux.
> Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech

vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.