How can I convert a char* string to long long (64-bit) integer?
I use MSVC and GCC compilers and my platforms are Windows, Linux and MAC OS.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use
strtoullfor unsigned long long orstrtollfor signed long long. On any Unix (Linux, Mac OS X), typeman strtoullorman strtollto get its description. Since both are part of the C99 standard they should be available on any system that supports C. The Linux man pages also have examples on how to use them.