int RandInt(int a, int b){
return (rand()%b+a);
}
I want to generate the random character values so i call it like this
char asciiValue = RandInt(65, 90);
but my output is not quite what i expect… am i doing something wrong?
–edit put in wrong values for randint call, my bad
RandInt(90, 90)will return an integer between 90 and 179. The value 90 represents a ‘Z’ and you can have a value up from there.What range are you tring to get?
Capital letters would be
RandInt(65, 26). Is this what you expect?