2011-11-29 2 views

답변

7

당신은 사용할 수 있습니다 strptime

struct tm tm; 

if (strptime("00:53:12", "%H:%M:%S", &tm) != NULL) 
    printf("hour: %d; minutes: %d; seconds: %d;\n", 
     tm.tm_hour, tm.tm_min, tm.tm_sec); 
1

사용 표준 기능 strptime :

strptime (TIMESTR, "%의 H : %의 M : %의 S", RET)

관련 문제