Okay, I'm making a game, and I need to use random inside a class, however I can't figure out how to seed the randomness into the class, so atm I'm getting the same random each time. I've tried stuff like srand(time) in main, however, that doesn't apply to the class, so how am I going to seed it in the class, call srand inside the constructor?
Skeen 0 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.