Untitled

 avatar
unknown
plain_text
a year ago
569 B
5
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