hi i would like u to tell me if i can make a random function to choose between four numbers and only them(-1 , 1 , -10 ,10)
james85 0 Newbie Poster
Recommended Answers
Jump to Posthi i would like u to tell me if i can make a random function to choose between four numbers and only them(-1 , 1 , -10 ,10)
Yes, you can. Quite easily, in fact:
int a[] = { -1, 1, -10, 10 }; int choice = …
Jump to PostI know it's not standard but I grew up with it.
Of course Murhpy's law says that the instant you offer a non-portable solution, people shoot back with "it doesn't work". Then there's the subsequent bout of twenty questions to reach the conclusion that their compiler doesn't support the feature …
All 7 Replies
nbaztec 45 Posting Pro in Training
james85 0 Newbie Poster
nbaztec 45 Posting Pro in Training
Narue 5,707 Bad Cop Team Colleague
nbaztec commented: Thanks for correcting me. :) +1
nbaztec 45 Posting Pro in Training
Narue 5,707 Bad Cop Team Colleague
nbaztec 45 Posting Pro 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.