whenever a have a similar function title inside a base class along with a derived class having a different code for every function must you set my work as virtual or perhaps is it simply a part of better programming?

You no longer need whatsoever to create the technique virtual. However, it ought to be virtual if you would like so that it is known as through "late binding", i.e. if, given basics pointer, you would like the derived approach to be known as.

If you do not want that to occur, it's frequently since these techniques are unrelated, by which situation you best provide the method within the derived class another title.

Calls of virtual functions are sent dynamically at run-time. This is actually the foundation of polymorphism.

A function that's declared as virtual within the base-class, will unconditionally be virtual in sub-classes.

No you don't need to do this.

Actually, when you should declare virtual so when to not is a component of effective program design itself.

Look here for additional info on Virtual and Pure Virtual functions.

Should you be prepared to use base class pointers to derived class instances, and also the functions have a similar signature, then you'll most likely need to make the function virtual, in addition to result in the class destructors virtual. By doing this, if a person includes a parent-class pointer to some derived type and they would like to call that function, they'll most likely wish to execute the kid class' version whether it's not the same as the parent's.

class Parent
{
public:
    virtual ~Parent() {}

    virtual void doSomething()
    {
        std::cout << "Parent";
    }
};

class Child : public Parent
{
public:
    virtual ~Child() {}

    virtual void doSomething()
    {
        std::cout << "Child";
    }
};

int main()
{
    Parent *p = new Child();
    p->doSomething(); // prints "Child" because of dynamic dispatch
}
class A {
public:
    void Foo() {}
    virtual void Bar() {}
};
class B : public A {
public:
    void Foo() {}
    virtual void Bar() {}
};

int main() {
    A *a = new A;
    B *b = new B;
    A *c = b;

    a->Foo();  // calls A::Foo on a
    b->Foo();  // calls B::Foo on b
    c->Foo();  // calls A::Foo on b

    a->Bar();  // calls A::Foo on a
    b->bar();  // calls B::Foo on b
    c->bar();  // calls B::Foo on b

    delete a;
    delete b;
}

See C++ FAQ § Inheritance — [cde] functions.