Advertisement
Guest User

Untitled

a guest
Sep 24th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. baby_type Parse_Line(const std::string line )
  2. {
  3. std::string name;
  4. std::vector<std::string> NameGrabber;
  5. std::vector<std::string> StructVec;
  6.  
  7. char * hold = new char[line.size() + 1];
  8. std::copy(line.begin(), line.end(), hold);
  9.  
  10. for (int i = 0; i < line.length(); i++) {
  11. NameGrabber.at(i) = std::strtok(hold, ",");
  12. VectorGrabber.at(i) = NameGrabber.at(i + 1);
  13. //VectorGrabber.at(i) = std::stoi(VectorGrabber.at(i));
  14. }
  15. VectorGrabber.resize(VectorGrabber.size() - 1);
  16. int total = VectorGrabber.at(VectorGrabber.length());
  17. baby_type Kiddo = { name, VectorGrabber, total};
  18. return Kiddo;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement