I'm very sorry for my bad English.
Here is my problem.

class A
{
public:
    virtual int runAlg() = 0;      //pure virtual
};
class B: public A
{
public:
    int runAlg()
    {
    //this is runAlg of B
    }
};
class C:public B
{
public:
    int runAlg()
    {
    //here, I need result returned in class B to continue, but How ?
    // I try to do like this
    // B *pB;
    // pB = this;
    // pB->runAlg;  but it will runAlg of C, and meet this statement again, so it causes stack overflow

    //this is runAlg of C
    }
};

I need result returned in class B to runAlg in class C.
Let consider this situation:

A *pA;
C objC;
pA = & objC;
pA->runAlg()  //it will runAlg of class C

How I can runAlg of class B to get result for running runAlg of class C ??
Thanks !

pA->B::runAlg()

It've done, Thank you very much.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.