字符串格式化防止数组越界
char buffers[10];
//_snprintf_s(buffers,sizeof(buffers),"%s","lsdafjasdlfjasdl;fjasdl;fjasd;fjasd;fjasd;fasd;fsd");
_snprintf(buffers,sizeof(buffers),"%s","lseeeeeeeeeeeeeeeeeeeed");
buffers[9] = 0;
printf("%s",buffers);
fflush(stdin);
摘自 C++ 技术中心
补充:软件开发 , C++ ,