Author Topic: Beginner practice nested structures codeblocks errors  (Read 1833 times)

Offline PsychadelicGumballMachine

  • Multiple posting newcomer
  • *
  • Posts: 15
Beginner practice nested structures codeblocks errors
« 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.