Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. struct Info
  2. {
  3. std::string cmd;
  4. std::string name;
  5. std::string location;
  6. }
  7.  
  8. Info* get_string()
  9. {
  10. std::string raw_input;
  11. std::getline(std::cin, raw_input);
  12. std::istringstream input(raw_input);
  13.  
  14. std::string cmd;
  15. std::string name;
  16. std::string location;
  17.  
  18. input>>cmd;
  19. input>>name;
  20. input>>location;
  21.  
  22. Info* inputs = new Info{cmd, name, location};
  23.  
  24. return inputs;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement