I am using gcc.
I've changed my code to look like such
Code:
#include<stdio.h>
#include<time.h> // added
#include<stdlib.h> // added
main(){
int one = 0;
srand(time());
one = (rand() % 4)+1;
printf("%d", one);
return 0; // added
}
after such I'm now getting errors compiling.
error: too few arguments to function 'time'
/usr/include/time.h:186:15 note: declared here
Ok, I fixed/figured it out. Thank you dmh and mk27. I placed "NULL" into the time function and like magic it works thanks guys!!!!
Can I some how mark this as solved or close it?