Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Info
- {
- std::string cmd;
- std::string name;
- std::string location;
- }
- Info* get_string()
- {
- std::string raw_input;
- std::getline(std::cin, raw_input);
- std::istringstream input(raw_input);
- std::string cmd;
- std::string name;
- std::string location;
- input>>cmd;
- input>>name;
- input>>location;
- Info* inputs = new Info{cmd, name, location};
- return inputs;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement