Skip to content

2024/04/20/for-the-love-of-god-only-call-srand-once #1

Description

@utterances-bot

For the love of god, only call srand() once | MyNameIsTrez’ blog

One of the most common C mistakes I’ve seen is to call srand(time(NULL)); right before using rand() to generate a random number:

https://mynameistrez.github.io/2024/04/20/for-the-love-of-god-only-call-srand-once.html

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions