How do I create random words, on C++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How do I create random words, on C++

help....

14th Feb 2017, 11:45 AM
john subira
john subira - avatar
3 Answers
+ 1
You mean an actual word or just some random letters?
14th Feb 2017, 12:01 PM
Robobrine
Robobrine - avatar
+ 1
If you want random letters just use the rand() function to give you numbers from 0 to 26 and add the numbers to 'a' (or 'A' for upper case letters) to get a single random char: char c = rand() % 26 + 'a'; /* <cstdlib> */ Use these then to make your random words.
14th Feb 2017, 12:12 PM
Robobrine
Robobrine - avatar
0
random letters, but if you do like just contact me on whatsap +255763252765, And I'll send you sample of an image of what I want.
14th Feb 2017, 12:05 PM
john subira
john subira - avatar