0
How could I make program in C++ who generate random names and surnames?
2 ответов
+ 14
This might help...
https://code.sololearn.com/cMArmlhta6l4/?ref=app
+ 2
Just generate random bytes in specific range (see ASCII table) and append each one to the string in for cycle.
string s;
for (int i = 0; i < 5; ++i)
{
// ch = Use std::rand() from <cstdlib>
s.push_back (ch);
}
// cout << s