This is a question related to the C language structure.

Asked 2 years ago, Updated 2 years ago, 25 views

structure Date
{
    int year;
}

struct SCH
{
    char a[Max_Line][1024];
    char b[Max_Line][1024];
    struct Date c;
};


To define a structure, the first structure does not fail, but the following structure continues to be an unexpected token 'structure'. ';' does not exist. What's wrong with the error?

c

2022-09-22 18:04

1 Answers

struct Date
{
    int year;
}

struct Date
{
    int year;
};

Please fix it to .


2022-09-22 18:04

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.