Let's put it this way.....
struct A {virtual void something(){cout <<"I'm A.";}};
struct B, A
{
void something(){cout << "I'm B.";}
void somethingFromB(){cout << "I'm from B.";}
}
int main()
{
A a = B();
//Now, here is where I want to call "somethingFromB" from A. How to?
}
So, as seen here, we have "something" that can be called from an object with type "A" just like an object with type "B". I now made an object with type "A" called a, and made it a "B". How to work with it just like it were a regular B object and be able to call "somethingFromB" from it?
EDIT--- I presume I could use:
A* a = new B(); ((B*)a)->somethingFromB();
Which seems to compile just fine :/