I have a string in form of a date eg . "10/23/2010"
i'd like to convert it to integer such that
int day = 23
int month = 10
year = 2010
Printable View
I have a string in form of a date eg . "10/23/2010"
i'd like to convert it to integer such that
int day = 23
int month = 10
year = 2010
ssharishCode:char date[] = "10/5/2010";
sscanf( date, "%d/%d/%d", &d, &m, &y );
Note: strtok modifies the orginal string