I have encountered a very confusing problem during development. The general situation is as follows:
Class A has two pure virtual functions: updatebounds () and updateattribute (). Class B is derived from Class A and implements these two functions. Then, a function in Class A calls updateattribute (). The trace shows that the last called is updatebounds () of Class B, instead of updateattribute () of Class B ()! I was puzzled. The solution is also very strange. I changed the name of updateattribute to setattribute and everything was okay. Is it suspected that the compiler has an error in processing the virtual function table or the function name change mechanism? In order to catch up with the development progress, there is no time to study it. If you have encountered such problems, please kindly advise.
I am using Visual C ++ 8.0, not hostingCode.