How to get a rodom integer

hi

I want to get a rodom integer, but I just get the same integer while using the fuction rand() for the first time. So I wonder wether there is a way in which I can get an unknow random integer.

Thanks in advance

You can use srand() to seed a new sequence of
psudo-random numbers for rand(). You could
try using the the current time() value or
somthing like that.

thks