关于字符数组 查找、分割
有这么一串数据:
"Action:InfCtrNet\r\nInfCtrCmd:callmst\r\nDisplayNumber:11000\r\n\r\n"
char CallDevice[] = {"Action:InfCtrNet\r\nInfCtrCmd:callmst\r\nDisplayNumber:11000\r\n\r\n"};#include <afx.h>#include <iostream.h>void main( void ){ CString str = "Action:InfCtrNet\r\nInfCtrCmd:callmst\r\nDisplayNumber:11000\r\n\r\n"; char *seps = "DisplayNumber:"; CString temp = str.Right(str.GetLength()-str.ReverseFind(':')-1) ; cout<< temp <<endl;}