问题遇到的现象和发生背景
c 将字符串拷贝到二维数组,崩馈了,不知道哪里出了问题,请大家伙解答一下,谢谢
char temp[5][20];
char* s = "hello";
strcpy_s(temp[0], strlen(s), s);
printf("%s", temp[0]);
c 将字符串拷贝到二维数组,崩馈了,不知道哪里出了问题,请大家伙解答一下,谢谢
char temp[5][20];
char* s = "hello";
strcpy_s(temp[0], strlen(s), s);
printf("%s", temp[0]);
就这几行代码吗?
strcpy_s(temp[0], strlen(s)+1, s);