Untitled
Anonymous
plain_text
11/14/2023 8:27 AM
760 B
14
Indexable
void LoadBot(int count) {
ifstream bot("bot.txt");
string line;
int added = 0;
if (count > 200) count = 200;
while (getline(bot, line)) {
if (added >= count) continue;
// Boşlukları başından ve sonundan silerek bots vektörüne ekle
line.erase(0, line.find_first_not_of(" \t")); // Başındaki boşlukları sil
line.erase(line.find_last_not_of(" \t") + 1); // Sonundaki boşlukları sil
bots.push_back(line);
added++;
}
cout << "added " + to_string(count) + " bots" << endl;
}
Editor is loading...
Leave a Comment