hi everyone how to generate random codes given to the computer if i give


three codes example : 123,234,567

i need to output anyone of these at a time

Put it into a vector, then randon shiffle it, and get the first element. Here is an
example:

int doIt(){
 declare std::vector<int> variable;
 while input.isgood, put input into variable.
 call std::random_shuffle with variable;
 print variable[0], a random number from the list of inputs given.
}
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.