[c++] rand() returns the same number each time the program is run