//Try std::stoull if you are using C++11 or greater. std::string tsStr = "7583483239"; uint64_t ts = std::stoull(tsStr); std::cout << ts;