Fix Bug in HEAD_STR changing.

This commit is contained in:
Kirigaya Kazuto 2017-03-29 18:44:31 +08:00
parent 05beab4b88
commit b5d39b7b86

View File

@ -120,8 +120,8 @@ void RemoteQuery(string PreCode,int ID)
} }
/*****************参数设置***************/ /*****************参数设置***************/
char* _head_str = (char*)"15080801"; char _head_str[16];
const char* const HEAD_STR = _head_str; const char* HEAD_STR = _head_str;
int _num = 40; int _num = 40;
const int& NUM=_num; const int& NUM=_num;
@ -184,7 +184,6 @@ int ParseCommand(string Command)
} }
printf("设置HEAD_STR中...\n"); printf("设置HEAD_STR中...\n");
_head_str=new char[16];
memset(_head_str,0,16); memset(_head_str,0,16);
strcpy(_head_str,headstr.c_str()); strcpy(_head_str,headstr.c_str());
printf("设置完成.\n"); printf("设置完成.\n");