1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help with generating random number

Discussion in 'C++' started by imported_dullboy, Aug 28, 2010.

  1. imported_dullboy

    imported_dullboy New Member

    Aug 28, 2010
    Likes Received:
    Trophy Points:
    If I want to generate 10 random numbers ranging from 0 to 9, is it possible to have 10 different numbers every time? For example, every time they should be like this, 1,3,4,9,0,2,8,7,5,6 without duplicate. I tried srand and rand but it looks like it doesn't work. They simply will generate duplicate numbers. Thanks for your inputs.

Share This Page