Derived class variable initialisation.
I have code with the following layout:
I have found out (the hard way) that I cannot simply put a virtual function in the constructor for 'Table'.
However, I cannot seem to find any alternative to this, I have looked at passing values up from the derived class but this doesn't seem to fit my problem at all.
Is there an easy way around this or am I looking at this problem the completely wrong way?
I can easily create an initialisation function in the subclass and call it in the main method, but I'm hoping there is a way to do it as I have described above.
Any help is much appreciated.
|All times are GMT +5.5. The time now is 06:19.|