mardi 17 août 2021

Use struct with forward declaratio

I need to use a struct before it was actually declared, how is that possible ? Thank you. I need to use C1 before it was declared, but I get incomplete type error.

   struct C1;
    
    struct Cap
    {
        C1 l1;
    };
    
    struct C1 : Cap
    {
    };

Aucun commentaire:

Enregistrer un commentaire