why i had a timeout error when using C++?