Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: PsychadelicGumballMachine on July 15, 2022, 08:15:55 pm

Title: Beginner practice nested structures codeblocks errors
Post by: PsychadelicGumballMachine on July 15, 2022, 08:15:55 pm
Hello,

I cannot figure out what this error means.  I have looked online and I couldn't find an answer that I understood.

The code (I realize it's not finished):
#include<stdio.h>
#include<stdlib.h>

int main()
{
    struct dateAndtime
    {
        struct date sdate;
        struct time stime;
    }
    struct dateAndtime birth;

    return(0);
}

The error I get with the "struct date sdate" line is:
error: field 'sdate' has incomplete type

Any help understanding this error would be appreciated.
Title: Re: Beginner practice nested structures codeblocks errors
Post by: Commaster on July 15, 2022, 08:52:17 pm
https://forums.codeblocks.org/index.php/topic,24970.msg170176.html#msg170176

and

http://forums.codeblocks.org/index.php/topic,9996.0.html