Yapı (struct) İşaretçileri ve Tip Uyuşmazlığı Derleme Hatası

SonsuzUs Her şey › Category: Soru › Yapı (struct) İşaretçileri ve Tip Uyuşmazlığı Derleme Hatası
sonsuz Kurucu sordu 44 dakika önce
void main() {
    typedef struct tagABC {
        int a;
        float b;
        char c;
        struct tagABC *n; // A
    } ABC;

    ABC a = {1, 1.0, 'a', NULL}, b = {2, 2.0, 'b'}, c = {3, 3.0}, *p; // B
    a.n = b; b.n = c; c.n = a; // C
    p = &a; // D
    while (p != NULL) {
        printf("%d", p->a);
        p = p->n; // E
    }
}

Yukarıda verilen programda hangi açıklama satırına karşılık gelen satırda derleme zamanı hatası meydana gelir ve sebebi nedir?

Cevapla