I want it to randomise a number between 1-255 that will ALWAYS have atleast a diffrence of 10. So it will NEVER generate a number thats 1-10 above or below the number it generated before.Code:packet[siz] = (char)(rand()%255);
e.g: generates 86 the next number has to be below 76 or above 96.
any help?




Reply With Quote