c++ task demo