阅读背景:

无法将char数组分配给struct数组的第三个插槽

来源:互联网 
#include <stdio.h>
#include <string.h>

#define NAMELENGTH 20
#define MAXPEOPLE 10

struct people{
    char name[NAMELENGTH];

    int ratings[MAXPEOPLE];
};

int main(void)
{
    struct people *men[MAXPEOPLE];
    strcpy(men[2]->name,"pie");

    return 0;
}
#include <stdio.h>
#include <string.h>

#define



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: