title: Converting string to three ints?
body: <p>i have a c++ project which has a date class with three variables int day, month and year</p>
  
  <pre><code>class date{
    int day;
    int month;
    int year;
      public:
    date(); // default constructor
    date(int, int, int); // parameterized constructor with the three ints
    date(string) // this constructor takes a date string "18/4/2014" and assigns 
                    18 to intday, 4 to int month and 2014 to int year
  
  };
  </code></pre>
  
  <p>i want to know how to split the string date and assign the sub strings to the three variables int day, month and year</p>