使用strcat返回的时候报错
strcat(data, "<?xml version=\"1.0\" encoding=\"GB2312\" standalone=\"yes\" ?>\r\n");
正确的做法是:
memset(buf, 0, 256);
sprintf(buf, "%s", "<?xml version=\"1.0\" encoding=\"GB2312\" standalone=\"yes\" ?>\r\n");
strcat(data, buf);
strcat(data, "<?xml version=\"1.0\" encoding=\"GB2312\" standalone=\"yes\" ?>\r\n");
正确的做法是:
memset(buf, 0, 256);
sprintf(buf, "%s", "<?xml version=\"1.0\" encoding=\"GB2312\" standalone=\"yes\" ?>\r\n");
strcat(data, buf);