使用strcat返回的时候报错

strcat(data, "<?xml version="1.0" encoding="GB2312" standalone="yes" ?> ");

正确的做法是:

memset(buf, 0, 256);
sprintf(buf, "%s", "<?xml version="1.0" encoding="GB2312" standalone="yes" ?> ");
strcat(data, buf);

 
原文地址:https://www.cnblogs.com/xpylovely/p/13141082.html