[求助]帮我更正下啊...
#include <stdio.h>
#include <string.h>
main()
{
char str2="this is an other string";
char str1;
str1="this is a string";
printf("str1=%s\n",str1);
str1=str2;
printf("str1=%s",str1);
}
麻烦更正下了,顺便多加句/* */
3Q
#include <stdio.h>
#include <string.h>
main()
{
char str2="this is an other string";
char str1;
str1="this is a string";
printf("str1=%s\n",str1);
str1=str2;
printf("str1=%s",str1);
}
麻烦更正下了,顺便多加句/* */
3Q
不就是这个么
因为这是C不是其他语言
不加*那就是字符变量 只存储一个字节长度的字符