View previous topic :: View next topic |
Author |
Message |
picj1984
Joined: 01 Mar 2010 Posts: 73
|
rand() function not working? |
Posted: Wed Jul 07, 2010 6:33 pm |
|
|
Compiler version 4.109
Hi, at the risk of being embarrassed... I can't figure out why my program with rand() function won't compile.
Here is the error:
*** Error 76 "SeekWah.c" Line 541(19,20): Expect ;
and line 541 is.....
counter is an unsigned char.
Doesn't get much simpler than this right? Anybody got any idea why I'm getting an error here? compiler bug?
Thanks |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1907
|
|
Posted: Wed Jul 07, 2010 6:40 pm |
|
|
A line before that is missing a ; |
|
|
picj1984
Joined: 01 Mar 2010 Posts: 73
|
|
Posted: Wed Jul 07, 2010 6:50 pm |
|
|
well, I'm sufficiently embarrassed. I had made a definition "rand" so that was the issue. |
|
|
Abdulla M.A.
Joined: 28 Mar 2010 Posts: 30 Location: Baghdad, Iraq
|
|
Posted: Thu Jul 08, 2010 10:23 am |
|
|
Did you set the value of "seed" and initialized the random number
generator "srand"???
Abdulla _________________ "A scientist can discover a new star, but he cannot make one. He would have to ask an engineer to do that."
"For an optimist the glass is half full, for a pessimist it's half empty, and for an engineer is twice bigger than necessary." |
|
|
|