I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
Index » Programming » C/C++ »

randomly generate names...

chicken_tenders\′s Photo
30 Nov 06, 10:01PM
(2 replies)
randomly generate names...
Im working on a project where the goal is to create between 500,000-1,000,000 randomly generated names(first and last) with an ID number.

Ive got the random ID number, the sorting, and the searching taken care of... but the one thing that is confusing me is how to randomly generate names :shock:

They dont have to be real names, just randomly generated letters in any order... any hints or tips? :lol: You can even throw me an algorithm and I can try and work out the code :wink:
nicholdug\′s Photo
1 Dec 06, 8:58AM
Hi Dear,

May be I can help you.

If you can generate random numbers can't you generate radom names, if the name can be anything. Generate random numbers betweeb 97 to 122 that is the ascii vlue for alphabets a to z, convert this numbers into characters and that is your name.

I hope My algorithm will solve your problem.

Bye.
lucian\′s Photo
3 Dec 06, 8:55AM
Perhaps another thing you could test for when generating the names is that you don't have too many consecutive vowels or consonants. This would make the names sound more realistic :)
Currently you need to be logged in to leave a message.