我将使用sscanf从字符串
我需要在名称中使用“ece”,在消息中使用“hello”,但我得到的是名称和消息都为空,而名称为“ece”、“says”:“hello”。
{"username":"ece","says":"hello"}
中提取名称和消息的特定值,格式如下:sscanf(data, "{"\username"\:"\%s"\,"\says"\:"\%s"\}", name, msg);
我需要在名称中使用“ece”,在消息中使用“hello”,但我得到的是名称和消息都为空,而名称为“ece”、“says”:“hello”。