0

I am having some troubles with printing out a structure

struct player
{
    char name[20];
}

The issue that I am having is that when I call out this struct in the main function.

int main()
{
    struct player First;
    First.name = "Example";
    printf("Name is: %s", First.name);
}

There is an error with "First.name = "Example"", I do not know what is wrong with it. The error says "error: assignment to expression with array type" I looked at videos and its seem that they are doing the same thing what I did.

I tried to find a question in this website with a similar problem, but I can't find it.

CBegin
  • 29
  • 7

0 Answers0