I’m having problems figuring out how to fix this error. The following code snippet generates this error in XCode 4.2:
“Static declaration of ‘randomint’ floows non-static declaration“
//Returns a random integer number between low and high inclusive */
static inline int randomInt (int low, int high) {
return (arc4random() % (high-low+1)) + low;
}
Any suggestions on how to fix it?
Thanks…
If you have a line like this somewhere in your file:
Remove it, or add static to the beginning of the declaration to look like this: