C++ task2 relocate