例如 0:15:24+1
这是个udp发过来的信号 已经存入数组
我需要有人帮我把它解析成
typedef struct get_time{
int wHour;
int wMinute;
int wSecond;
}*GET_TIME;
get_time info;
info.wHour = 0
info.wMinute = 15
info.wSecond = 25
command = 1
我要写的东西太多了 没空写了 谁有空帮个忙 今天就玩CSDN了 工作都没搞定呢
------解决方案--------------------
int hour, min, sec, command;
sscanf(strs.c_str(), "%d:%d:%d+%d", &info.wHour, &info.wMinute, &info.wSecond, &command);
------解决方案--------------------
char数组转CString再取子串