finish an easy tcp client with C++
modify err