top | item 45885440

(no title)

qalmakka | 3 months ago

   struct parent *p = (struct child *)c; // valid
Note that this cast would be valid without the MS extensions too, you can always cast a pointer to a struct to a pointer to its first member and viceversa. What the MS extensions allow you to do is to just do `c->i` directly, without having to name the parent

discuss

order

No comments yet.