Skip to content
Permalink
a01b93a8d6
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
15 lines (13 sloc) 247 Bytes
#ifndef RANDOM_H
#define RANDOM_H
#include <random>
int randomNum(int min, int max){
static bool first = true;
if (first)
{
srand( time(NULL) );
first = false;
}
return min + rand() % (( max + 1 ) - min);
}
#endif