I thought of a new and easy(i think) way to come up with random numbers everytime you call a function. This seems just to easy I was wondering if anyone could find a flaw of some sort with the code:
I'm sorry if this has been posted I made a quick search and found nothing.Code:int Random(int min, int max){ int *number = new int( (rand() % max) + min); int final = *number; delete number; return final; }
Thanks
-Paz