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.
rand
is part of cstdlib
, try including cstdlib
in your code.
#include <cstdlib>
or
#include <stdlib.h>