fork download
  1. #include <iostream>
  2. #include <sstream>
  3.  
  4. int main()
  5. {
  6. using namespace std;
  7. string date = "3/5/13";
  8. istringstream ss(date);
  9. int dd, mm, yy;
  10. char dummy;
  11. ss >> dd >> dummy >> mm >> dummy >> yy;
  12. cout << dd << " " << mm << " " << yy << endl;
  13. }
Success #stdin #stdout 0s 3028KB
stdin
Standard input is empty
stdout
3 5 13