我正在尝试更多地了解C,我想知道是否有人可以澄清这里发生了什么。我收到编译器警告:“警告:赋值从指针生成整数而无需强制转换 @ msg[msglen+1] = "\0""
char *msg = NULL;
int len = 10;
int msglen = 0;
while(<argument>) {
msg = (char *)calloc(len, 1);
strncpy(msg, <some string>, len);
msglen = strlen(msg);
msg[msglen+1] = "\0";
谢谢,感谢您的帮助!