Some points:
• You need to tell us a bit more than the normal "this doesn't work" thing. What do you mean when you are not able to generate unique numbers? Is the array not filled completely or the numbers are getting repeated.
• You need to break out of the loop in your linear search if the required value is found.
• The loop counter in the loop which generates random numbers should not be incremented if a duplicate in found in the list.
• Use the current time as seed instead of a small number like 7 or 12.
Last edited by ~s.o.s~ : Apr 15th, 2007 at 3:28 pm.
I don't accept change. I don't deserve to live.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.