70,023
社区成员




char const *strs = "0:15:24+1";
sscanf(strs, "%d:%d:%d+%d", &info.wHour, &info.wMinute, &info.wSecond, &command);
忘了删除多余的代码
想要更快的速度可考虑boost::spirit
int hour, min, sec, command;
sscanf(strs.c_str(), "%d:%d:%d+%d", &info.wHour, &info.wMinute, &info.wSecond, &command);