Unable to generate random numbers

I'm getting two errors whenever I generate random numbers. The first one tells me that there are "too many arguments to function 'random'". It thinks I'm trying to call the random() function stated in stdlib.h and I can't get eclipse to understand that I want the random() function from WProgram.

The next error is just a strange warning when I call randomSeed(): "implicit declaration of function 'randomSeed()'". Whenever I try and get eclipse to go to the declaration, it is unable to, as if it can't find where the function is declared, but it doesn't give me an error.

I can bet that I just misconfigured something or other, but all seems in order to me.

I will post the code as soon as I can, but due to living in south US the tropical storm I have no electricity, I'm currently posting from my iPhone.

Thanks in advance for any help you can give.

I'm not sure what you mean by that... I'm trying to use a function defined in WProgram.h but as you said I'm experiencing "identity collision". Are you suggesting I Chang ethe name of random() in WProgram?

Sorry for my slowness. This is what I get for thinking I can jump from Java to C without a bit of research first.

Yes I know that. But coming from a background of Java, you would call an external method by appending the class name and a "." before the method name so you could have the same method name in different classes.

Anyways... I think that Arduino's random methods just call on stdlib's methods and alter the answer to fit the parameters. I'll see if I can get it worked out in my 5 minutes of battery life left

Darn... So much for that. I'll just have to wait for the electricity to come back before doing anything else.

EDIT: Electricity is back up! I got it fixed by making a method similar to the one in WMath:

long randomNum(long min, long max) {
	return ((random() % (max - min)) + min);
}

and then to set the seed use srand().

But now I have yet another problem... time for another thread!