Twitter | Pretraživanje | |
Naim A.
Ever get a pointer to the middle of a struct? Just add the __shifted keyword to the variable's type definition!
Reply Retweet Označi sa "sviđa mi se" More
GI 25. sij
Odgovor korisniku/ci @naim94a
Can't you just define another struct called person inside PersonNode?
Reply Retweet Označi sa "sviđa mi se"
Naim A. 25. sij
Odgovor korisniku/ci @ebp_esp_eip
You could, but in some cases Person is rarely used on it's own and defining it separately would make things uglier (a1->person->name, instead of a1->name). This also works with negative offsets, which is useful for upcasted c++ instances.
Reply Retweet Označi sa "sviđa mi se"