Question d’entretien chez Everpure

Given two base classes and a class derived from them how might one layout class instance memory so that polymorphism will work correctly. Problem was simplified in that one could assume memory was a series of same-sized slots and methods and attributes took up one slot each.

Réponses aux questions d'entretien

Utilisateur anonyme

26 févr. 2013

hello , could you expand a little on the question and what you cam up with ?

Utilisateur anonyme

26 févr. 2013

No, I can't really elaborate. It has been almost 3 years, the solution was convoluted, and I think I have blocked it out, since I don't remember much. I believe it involved having place holders for methods and attributes in the base class that carried over to the derived class. But I'd suggest a good compiler book, some time with the C++ compiler, and hours to kill if you really want to know the full answer.

Utilisateur anonyme

11 nov. 2010

I thought I did rather well, as I figured out (with some help) all but one aspect of the problem.

1