class A
{
public:
    virtual void
        doSomething(void)
    {}

    void
        doStuff(void)
    {
        doSomething();
    }
};

class B : public A
{
public:
    void
        doSomething(void)
    {
        // do some stuff here
    }
};

B * b = new B;
b->doStuff();

It provides me with Segmentation fault. What shall we be held doing wrong? It will work nicely for me!

Once I remedied the syntax errors and added a primary() function, it put together and performed for me personally without any problems. Try posting the actual code that triggers the issue, and re-think your code formatting.

So far as I can tell, you are not doing any polymorphism within the code bellow the course definition.

b->doStuff() should call the technique of B class. If you wish to inside B call A-> doSomething you should use A:: doSomething

You shouldn't possess the : after class A and public A...