News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Beginner practice nested structures codeblocks errors

Started by PsychadelicGumballMachine, July 15, 2022, 08:15:55 PM

Previous topic - Next topic

PsychadelicGumballMachine

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.