View difference between Paste ID: UTHeUpNW and i1GXeRZ5
SHOW: | | - or go back to the newest paste.
1-
void botNameGen(char *botName);
1+
std::string NameStems[] = {
2
    "Sarge: ", "Jenny: ", "Harold: ", "Michael: ", "Rick: ",
3
    "Axle: ", "Bob: ", "Janine: ", "Ester: ", "Lacey: ",
4
    "Lexi: ", "George: ", "Nitro: ", "Amber: ", "Coco: ",
5-
const char NameStems[][10] = {
5+
6
};
7
std::string botNameGen()
8
{
9
    return NameStems[rand() % 20]);
10
}
11-
void botNameGen(char* botName)
11+
12
srand((long)time(NULL)); //Seed the random number generator...
13-
    botName[0]=0; //initialize the string to "" (zero length string).
13+
std::string botPlayer1Name = botNameGen();
14
    
15-
    strcat(botName, NameStems[(rand() % 20)]);
15+
cout << sPlayer->pName << ": ";
16
getline(cin,input);
17-
  
17+
18
if(botPlayer1Name == "Sarge: ")
19
                {
20-
char botPlayer1Name[21]; //Used to hold our character's name
20+
21-
    srand((long)time(NULL)); //Seed the random number generator...
21+
22-
        botNameGen(botPlayer1Name);
22+
23
                        botPlayer1Name == "Sarge: ";
24-
                                    cout << sPlayer->pName << ": ";
24+
25-
                                    getline(cin,input);
25+
26
                }