User forums > Using Code::Blocks

Beginner practice nested structures codeblocks errors

(1/1)

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.

Commaster:
https://forums.codeblocks.org/index.php/topic,24970.msg170176.html#msg170176

and

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

Navigation

[0] Message Index

Go to full version