请问一下,哪出问题了?

#include<stdio.h>
#include<string.h>
#include<conio.h>
struct candidate{
    char name[20];
    int count;
};
int main(void)
{
    struct candidate person[3]={"Li",0,"Zhang",0,"Sun",0};
    int all;
    char name[20];
    scanf("%d",&all);
    for (int i = 0; i < all; i++)
    {
        scanf("%s",name);
        for (int b = 0; b < 3; b++)
        {
            if (person[b].name==name)
                {
                    person[b].count++;
                }
            
        }    
    }
    
    for (int g = 0; g < 3; g++)
    {
        printf("%s:%d\n",person[g].name,person[g].count);
    }
    return 0;

}
 

    if (person[b].name==name) C语言中,char数组的字符串请使用strcmp()来比较,而不是用==。

你是指哪里有问题?

if (person[b].name==name)
{
    person[b].count++;
}

这段代码的问题