What is the benefit of using Polymorphism in c++ on simple example?
I have simple programm that shows a polymorphism. The question: WHAT IS THE BENFIT OF USING bs->test() above simple call of dr1.test() and dr2.test()?

    #include <iostream>
    using namespace std;
    class base
    {
    public:
    	virtual void test()=0;
    };
    class derieved1:public base
    {
    public:
    	void test(){cout<<"Derieved 1"<<endl;}
    };
    class derieved2:public base
    {
    public:
    	void test(){cout<<"Derieved 2"<<endl;}
    };
    int main()
    {	
    	derieved1 dr1;
    	derieved2 dr2;
    	base* bs;
    	bs=&dr1;bs->test();
    	bs=&dr2;bs->test();
    	dr1.test();
    	dr2.test();
    	return 0;
    }

Thanks for the answer.
What is the benefit of using Polymorphism in c++ on simple example?
===

I have simple programm that shows a polymorphism. The question: WHAT IS THE BENFIT OF USING bs->test() above simple call of dr1.test() and dr2.test()?

    #include <iostream>
    using namespace std;
    class base
    {
    public:
    	virtual void test()=0;
    };
    class derieved1:public base
    {
    public:
    	void test(){cout<<"Derieved 1"<<endl;}
    };
    class derieved2:public base
    {
    public:
    	void test(){cout<<"Derieved 2"<<endl;}
    };
    int main()
    {	
    	derieved1 dr1;
    	derieved2 dr2;
    	base* bs;
    	bs=&dr1;bs->test();
    	bs=&dr2;bs->test();
    	dr1.test();
    	dr2.test();
    	return 0;
    }

Thanks for the answer.