I'm having a problem with my code, in which I try to generate a number between 0 and a dim
user-defined variable. The line I'm having problem is:
arrayPos = rand()%dim;
I already called srand(time(NULL))
and the arrayPos is getting some wierd numbers like 9.267e-315 and so on.
Any ideas on how to fix it?
Thank you