Don't get the same number!
#2

Save all the used numbers in a file. Then, when someone buys a new number, loop through the file's context and use strcmp between the line of the file and the number (formatted to strings [wiki => strcmp helps]).
If the file is read to the end, and the strcmp was never same, then he/she may use the number, in case that there is a line same to the number, stop the loop and return that the number is already in usage.
Got that? ^^

Jeffry
Reply


Messages In This Thread
Don't get the same number! - by The Woody - 22.06.2011, 14:47
Re: Don't get the same number! - by Jeffry - 22.06.2011, 14:50
Re: Don't get the same number! - by The Woody - 22.06.2011, 14:56
Re: Don't get the same number! - by Jeffry - 22.06.2011, 15:04
Re: Don't get the same number! - by The Woody - 22.06.2011, 15:19
Re: Don't get the same number! - by Jeffry - 22.06.2011, 15:23
Re: Don't get the same number! - by Babul - 22.06.2011, 15:40
Re: Don't get the same number! - by Jeffry - 22.06.2011, 15:44
Re: Don't get the same number! - by The Woody - 22.06.2011, 16:01
Re: Don't get the same number! - by Jeffry - 22.06.2011, 17:13

Forum Jump:


Users browsing this thread: 4 Guest(s)