Keep getting erron messege, not sure how to fix it!
I am new to C++ and I am writing a program that will create 100 random numbers and split them by odd and even. I think I have the code correct but I keep getting this error:
error C2440: '=' : cannot convert from 'void' to 'int'
The error is for the line sum = srand(i)
Here is the program:
using namespace std;
int i, num, even, odd;
for(i = 0; i < 100; i++)
num = srand(i);
if ( num % 2 == 0 )
even = num;
odd = num;