random number array generator in C++