I am getting the error:
tester.cpp|20|error: 'rand' was not declared in this scope|
Did I miss to include something here?
void tester::volumeset(bool A_B, int i, int v)
{
if (A_B == true)
{
A_volumn[i] = rand(v+1);
}else{
B_volumn[i] = rand(v+1);
}
}
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With