Alright guys, I'm teaching myself C with help from "C for dummies 9 in 1 reference guide" and I'm going through and I am stumped on one of the codes the author provided.
That is the code that I have typed into Dev-C++ and it's saved as a ".c" but when I compile I get the following errors:
long int hat;
long int seed;
printf("Enter a seed number:");
hat = rand();
printf("%5d is a truly random number!\n",hat);
[Linker error] undefined reference to `random'
[Linker error] undefined reference to `srandom'
So my question is why does it pull up this error? How do I go about fixing it? Also why does dev-c++ not like the "random();" function, which is I used "rand();"?