srand() and rand()
So I am trying to get the psuedo random number generator to work. Everywhere I look online tells me this:
1) Include the ctime and cstdlib headers.
2) Use something like the system time to seed the generator exactly like this.
3) Call rand() to generate random number.
Unfortunately I only get to step two. I recieve an error during compilation that says that function, srand(), written exactly as seen above, does not evaluate to a function taking one argument. What could be causing this?
Having a local variable with the same name as the function usually generates that kind of warning.
So, this compiles, but I'm not sure if it's working properly...
Well I did have a local variable called time, mistake of impatience. Thanks