3.6 * vector_a; why can I not implement this binary operator as a member operator of a class Vector?
class cycle
{
cycle();
~cycle;
pedal();
};
class bicycle
{
bicycle();
~cycle;
pedal();
};
bicycle *bikeptr = new bicycle;
cycle cycleptr=dynamic_cast <cycle>bikeptr;
cycleptr->pedal();
Okay, here are the questions I have...
which pedal function gets called, cycle or bicycle?
If I want to make sure the cycle version gets called, how do I do that? Would it be similar for bicycle, just change the names?
If I want pedal to be a pure virtual function, how do I do that?
How do I call the "cycle" pedal in main?
Can it be called from bicycle also?
Sorry about all the questions, but virtuals have me kind of lost and I'm trying to make sense of it