It will probably be to do with how a computer generates a random number I would guess.
A computer can't actually generate a random number - think about how you create a random number, to generate something random you'd need some kind of personality to pick a number at random.
To generate a "random" set of numbers, a computer uses a seed number - this is why before doing any random function you need to call a randomize function (in C++ it's called srand, some other languages call it randomize) and give it a seed number to use as it's mathematical basis for generating a set of floating point values between 0 and 1 (it always generates random numbers between 0 and 1 and then multiplies it by the range you need - for example if you wanted a random number between 0-10 it might produce the number 0.5 and then times it by ten which would give you 5, 10-20 would be 0.5 * 10 (range 10-20 = 10) + 10 (start of range is 10) which would give 15)
Of course the sequence of the numbers all depends on what you are initially using as a random seed. Normally you would use something like the system time/date variable as this is constantly progressing and therefore won't be the same again (even the same time tomorrow will be a different date) and so that way you'll always get a "random" combination, even though the random function is mathematically decided.
If using a date/time on a PC you wouldn't really notice the random seed in operation as it would change so widely, but on some cheap CD players when you stick them on random you can sometimes see the random seed in operation, as most cheap CD players don't have any proper way to know the time and date, so just use the number of processor ticks to generate the random function (or just use track length or something), and so you might notice that even when you stick random on a CD player it always plays the same songs in the same random order because it's using the same seed number every time.
Now this with this random number you have found here - firstly what are you initializing your random numbers with - have you got something somewhere like an srand function
http://www.cplusplus.com/reference/cstdlib/srand/
If not then that is why you are getting the same number over and over again, call the srand function with something like
srand ( time ( NULL ) ) ;
and you might notice a major difference.
Also are you using the same value for srand every time
srand ( 9 ) ;
should give the same combination of random numbers every time, as long as nothing else interferes with it.
Finally it could be that the -- are unexpected by C++ and C++ has a tendency to try and utilise in funny ways what ever is unexpected. Something like BASIC would stop and complain that there is something wrong, C++ is more like ok it's not right data but I'll carry on regardless and try and utilise this rubbish data in some other way (I remember finding that one out with cin years ago and the space bar - cin sees a space as a CR character for some strange reason and so anything after a space is pressed is used for the next cin!). It's up to the programmer to notice these problem - C++ isn't going to baby you like BASIC does!
So it could be putting this invalid data anywhere and is most probably interfering with the random function area of the memory in some way.