Please,look at this simple class:
class TernaryPolynomial;
class IntegerPolynomial;
class DenseTernaryPolynomial:public IntegerPolynomial,public TernaryPolynomial
{
public:
DenseTernaryPolynomial();
static DenseTernaryPolynomial generateRandom(int,int,int);
};
Can you please explain me why does the compiler complains that TernaryPolynomial must be a previously defined class or struct? I thought it shouldn't care at all since i put a forward declaration of that class. Here's the TernaryPolynomial class
class Polynomial;
class IntegerPolynomial;
class TernaryPolynomial:public Polynomial
{
public:
TernaryPolynomial();
virtual ~TernaryPolynomial();
virtual IntegerPolynomial toIntegerPolynomial() = 0;
};