c++ - Program steps into wrong function -


i have child class bunch of functions implement pure virtual functions in parent class.

when debugging, works way should except 1 function.

when try step functiona() execution instead enters functionb(), , call stack says i'm in functionc().

functiona() works everywhere else inherit parent class.

changing function name nothing, , cleaning / rebuilding nothing. got work adding dummy parameter function, rather real solution.

i ran similar months back.

it turned out author doing fiendishly clever things during initialization, , compiler hadn't set derived class vtable yet when method call occurred.

it bear find it.

you're going have take careful @ vtable pointers, , generated assembly language, figure out in initialization process.

alternatively, vtable pointer in object may have been overwritten wild copy object.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -