Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Player::setCommand(std::vector<std::string> &new_command)
- {
- std::string input = "";
- std::string argument = "";
- new_command.clear();
- command_.clear();
- while (command_.size() == 0)
- {
- std::cout << "sep> ";
- getline(std::cin, input);
- std::istringstream input_string(input);
- while (input_string >> argument)
- {
- command_.push_back(argument);
- }
- }
- std::transform(command_[0].begin(), command_[0].end(), command_[0].begin(), tolower);
- new_command = command_;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement