我有这个全球
const char PROTOCOL_SET_WIFI_CONNECTION[]= "setWifi";
//or this one
//#define PROTOCOL_SET_WIFI_CONNECTION "setWifi"
然后,当我试图比较字符串时,我遇到很多问题(硬件问题,如崩溃)
char *header = strtok (incomingData,":");
if (strcmp (header,PROTOCOL_SET_WIFI_CONNECTION ) == 0)
//做东西
答案 0 :(得分:2)