I am currently trying to find I solution that will not let a value exceed a certain value, in this case, 0x1000 (4096). This is an easy solution, but the key here is speed.
int someVal = rand();
for(int i = 0; i < 10000; i++)
{
if(someVal > 0x1000)
someVal = 0x1000;
cout << someVal;
someVal = rand();
}
That is too slow, unless of course there is no other way to do it. Thanks for any help, Hetelek.
Could try this;