Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- baby_type Parse_Line(const std::string line )
- {
- std::string name;
- std::vector<std::string> NameGrabber;
- std::vector<std::string> StructVec;
- char * hold = new char[line.size() + 1];
- std::copy(line.begin(), line.end(), hold);
- for (int i = 0; i < line.length(); i++) {
- NameGrabber.at(i) = std::strtok(hold, ",");
- VectorGrabber.at(i) = NameGrabber.at(i + 1);
- //VectorGrabber.at(i) = std::stoi(VectorGrabber.at(i));
- }
- VectorGrabber.resize(VectorGrabber.size() - 1);
- int total = VectorGrabber.at(VectorGrabber.length());
- baby_type Kiddo = { name, VectorGrabber, total};
- return Kiddo;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement