比如字符串"abcdefg";
char str[7] = "abcdefg";
就是错误的,编译时就会有越界报错。
需要分配八个字节的空间:
char str[8] = "abcdefg";
或者写成:
char str[] = "abcdefg";
char str[7] = "abcdefg";
就是错误的,编译时就会有越界报错。
需要分配八个字节的空间:
char str[8] = "abcdefg";
或者写成:
char str[] = "abcdefg";
沉静 | ||||||||||||||||||||||||||||||||||||
首页 >> | ||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||
![]() |
回复Comments
{commenttime}{commentauthor}
{CommentUrl}
{commentcontent}