typedef struct Monom{
int coeficient;
int exponent;
struct Monom* Next;
}Monom;
typedef struct list_polinom{
struct Monom* First_element;
}list_polinom;
int main(){
struct list_polinom* Polinoms;
struct Monom* Monoms;
Polinoms = (struct list_polinom*)malloc(x * sizeof(struct list_polinom));
Monoms = (struct Monom*)malloc(y * sizeof(stuct Monom));
Polinoms[0].First_element = &Monoms[z];
Monoms[z].exponent = x;
return 0;
}
So will ich printf("%d\n",Polinoms[0].First_element.exponent
) drucken, aber ich habe diesen Fehler:Drucken Sie ein Mitglied der Struktur, die ein Zeiger auf eine andere Struktur ist?
[Error] request for member 'exponent' in something not a structure or union
, was mache ich falsch?
Hinweis: x, y, z sind ganze Zahlen.