Ввел shared_ptr и исключения
Merge branch 'master' of https://github.com/balashovartem/tasksForAlexey