Why am I getting “void value not ignored as it ought to be”?
The prototype for srand is void srand(unsigned int) (provided you included <stdlib.h>).This means it returns nothing … but you’re using the value it returns (???) to assign, by initialization, to a. Edit: this is what you need to do: