With virtual methods, the hack I suggested applies. If not, it is like Martin wrote.
Since you are translating from C++: are you translating or making an interface?
If you are only translating, your code is wrong, if you are writing just an interface we can help if you do not know how to write a class cracker yourself. (You probably can)
Plz note that memory layout from C++ compilers differ per C++ compiler, since that part is NOT part of the C++ language and as such undefined: in such case you need to "flatten", e.g translate to C, not C++.
GNU C++ and BC++ are easy. Others may be more difficult if the interface part of the VMT does not start at 0.
But I
guess you are not interfacing: in that case simply make the methods all virtual.
See what me (small credited part) and the late Rudy Velthuis wrote about that 20+ years ago here:
http://www.rvelthuis.de/articles/articles-cppobjs.html This still applies, just in case.
You can still access or change non-virtual members by redirecting them by use of trampolines.
Which is also not too difficult but not recommended.
Just a side note: if the methods you are after are NOT virtual they are not really OOP anyway.
If you show us some almost compilable code, that would help: the solution may be much easier than the scenario I described above. Simply the class cracker, because that always works without inheritance issues.
Last note: inheritance can
not cause stack problems: they are one way and one way only even if riding the inheritance ladder to a root. A base class can not access nor have knowledge of anything in the future. And that is language independent.