Random not declared in scope

random is not a standard C++ function; it’s a POSIX function, so it’s not available on Windows. Use rand instead, or better, the new C++11 randomness library.

Leave a Comment