m4n71k0r

Untitled

Jun 28th, 2012
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <vector>
  2. #include <string>
  3. #include <tuple>
  4.  
  5. int main()
  6. {
  7.   std::string info{"John Doe|||nowhere|||010"};
  8.   std::string name, address, phone;
  9.  
  10.   std::tie(name, address, phone) = info.split("|||");
  11.  
  12.   std::cout << info << " --> " << name << ", " << address << ", " << phone;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment