hi
these are some variables:
struct TIJDSTIP {
int dag;
int beginuur;
int operatiekamer;
};
struct ALLE_PATIENTENDATA {
int nummer;
char naam[20];
struct TIJDSTIP tijdstip ;
int leeftijd;
int discipline;
};
first I only fill: nummer, naam, leeftijd and discipline (so the main strucure) using scanf.
example:
scanf ("%d", &patient[count].discipline);
this gives a windows error (using devc++). you know the kind: send report / do not send report.
However, if I remove the second strucure (TIJDSTIP) or define all the variables in it -> everything works just fine.
example:
struct ALLE_PATIENTENDATA {
int nummer;
char naam[20];
int leeftijd;
int discipline;
};
My question:
Why does the undefined structure TIJDSTIP cause a problem using scanf with the structure ALLE_PATIENTENDATA, when I'm not even using the variables in TIJDSTIP yet?
thx