i don't recommend atoi() or atol(). this does not handle invalid strings (non-integer strings) very well at all. for instance, if you try
value = atoi("CowAndChicken");
the result will be zero (value = 0)
and if you try
value = atoi("0");
the result will also be zero (value = 0)
strtol() avoids this confusion by allowing you to tell the difference between an actual zero, and an invalid string. it also will convert number bases other than base 10. look up the strtol() function here: http://www.cplusplus.com/reference/clibrary/cstdlib/strtol/
And I would use both "strtok" to parse the strings between the separator characters (which could be "/" or "-" or ".") in conjunction with "strtol", to properly convert each numeric string.
this is the best method, IMO, because it will allow you to handle conditions where you have extra spaces or invalid characters, or differently formatted month/date numbers.
for instance, consider all the differences between:
"01/01/10"
"1/1/10"
"1/01/2010"
"01 - 01 - 2010"
"1-1-10"
"01.01.2010"
etc.