C++ task2 LocateUpdate