Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <vector>
- #include <string>
- #include <tuple>
- int main()
- {
- std::string info{"John Doe|||nowhere|||010"};
- std::string name, address, phone;
- std::tie(name, address, phone) = info.split("|||");
- std::cout << info << " --> " << name << ", " << address << ", " << phone;
- }
Advertisement
Add Comment
Please, Sign In to add comment