Edit: Thanks to comments of Mateusz and A I have corrected code in this post (copy & paste error) Covariant Return Types is language feature which allows you to change return type of your virtual function to covariant type ie. pointer to derived class instead of pointer to base class – see example below:

Read More

Junior task – sum of integers in vector Assume that we have vector of integers ie.

and we want to write function which will sum up all its elements.

In which cases it will work?

Middle task – sum of elements in vector no matter what type Let’s make it more generic… Read More