[Cs3] executing code before base class constructor

Mikhail Nesterenko mikhail at cs.kent.edu
Wed Mar 17 16:46:42 EDT 2021


CS3 students,

There was a question as to whether it is possible. I said, I'll
investigate. So, there may be possibilities but none good. C++ assumes
that the base class objects are constructed before any of the derived
class code is executed. Here is a question on stackoverflow:

   https://stackoverflow.com/questions/15366621/are-parent-class-constructors-called-before-initializing-variables

thanks,
-- 
Mikhail


More information about the cs3 mailing list