Original Post
I hope someone can help with this, but its kinda difficult for me to explain. I've been messing around with inheritance, but have come across a problem. I have a base class with contains the following function: The GetMinLevel and GetMaxLevel function are members of this base class. The problem is that when I derive a new class from this base class and replace the GetMinLevel and GetMaxLevel functions, it is still the original functions that are called when I call the Compress_Init2 function. The only way I've found to make it behave correct is to redefine the Compress_Init2 function in the derived class (even though it still has the same body) Is there a better way? (... I hope I explained that well enough.)
eCWresult cCompressor::Compress_Init2 (const int iPercentage)
{
float fRatio = (iPercentage / 100.0f);
int iLevel = GetMinLevel () + (int)((GetMaxLevel () - GetMinLevel ()) * fRatio);
return Compress_Init (iLevel);
}