std::atoll with VC++

Cookie picture Cookie · Jul 7, 2011 · Viewed 8.3k times · Source

I have been using std::atoll from cstdlib to convert a string to an int64_t with gcc. That function does not seem to be available on the Windows toolchain (using Visual Studio Express 2010). What is the best alternative?

I am also interested in converting strings to uint64_t. Integer definitions taken from cstdint.

Answer

nos picture nos · Jul 7, 2011

MSVC have _atoi64 and similar functions, see here

For unsigned 64 bit types, see _strtoui64