fork download
  1. #include <iostream>
  2. #include <sstream>
  3.  
  4. int main() {
  5.  
  6. std::string s = "000010109000010309000010409";
  7. std::istringstream iss(s);
  8.  
  9. char number[6], day[3], month[3];
  10. while (iss.get(number, 6) && iss.get(day, 3) && iss.get(month, 3))
  11. std::cout << number << " " << day << " " << month << std::endl;
  12.  
  13. return 0;
  14. }
Success #stdin #stdout 0s 4392KB
stdin
Standard input is empty
stdout
00001 01 09
00001 03 09
00001 04 09