把下面代码加到某个头文件中,放在最后include, 或者直接放在cpp文件上面
#if defined(WIN32) || defined(WIN64) // windows platform
# ifdef _MSC_VER
# if (_MSC_VER >= 1800)
#define strcpy(dest,src) strcpy_s(dest,strlen(src)+1,src)
#define strcat(dest,src) strcat_s(dest,strlen(dest)+strlen(src)+1,src)
# endif
# endif
# endif