#include <iostream>
using namespace std;
class bike {
public:
bike ()
{
cout << "Bike: no parameters\n";
}
bike (int a)
{
cout << "Bike: int parameter\n";
}
void color(int a,int b)
{
cout<<"Inside Bike Color"<<endl;
}
};
class ducati : public bike {
public:
ducati (int a)
{
cout << "Ducati: int parameter\n\n";
}
void color(int a,int b,int c)
{
cout<<"Inside Ducati Color"<<endl;
}
};
class honda : public bike {
public:
honda (int a) : bike (a)
{
cout << "honda: int parameter\n\n";
}
};
int main ()
{
ducati monster(0);
ducati *dObj=new ducati(10);
bike *bObj=&monster;
bObj->color(10,20,30); //it's showing error at this line.
return 0;
}
Please help me out