Hi all, I am currently trying to generate a number from a specified range
using a function
int number_range(int from, int to) {
return (from + rand() % (to-from+1));
}
but negative numbers cause the program to crash.
How can i go about doing this so it can take numbers of all kinds?