 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Charlie Zender Guest
|
Posted: Tue May 22, 2007 12:09 am Post subject: Cross-platform strtoll() functionality |
|
|
Hi C++'ers,
I need a cross-platform C++ method of converting strings to eight byte
integers.
GNC g++ fully supports the (non-standard) "long long" integer size.
One can declare "long long" integers and g++ supports accessing
std::strtoll() and std::strtoull(), which I think are equivalent to
their C99 counterparts.
The other C++ compilers that I've tried (PGI pgCC and AIX xlC) support
"long long" but do not support std::strtoll() and std::strtoull() (at
least with the switches I've tried).
I need cross-platform strtoll() and strtoull()-functionality.
What is the recommended way to obtain this functionality in C++ now?
I have the BSD source code for strtoll.c so I can, as a last measure,
implement this function in my code, but I want to make sure I do so
in a sane way, e.g., in the way a future C++ standard would support
strtoll() and strtoull()-functionality. Would this be as
std::strtoll() or is some other method preferred?
Any advice appreciated,
Charlie
--
Charlie Zender, surname (AT) uci (DOT) edu, Department of Earth System Science
3228 Croul Hall, UC Irvine, Irvine CA 92697-3100. (949) 824-2987 :)
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ] |
|
| Back to top |
|
 |
Powered by phpBB © 2001, 2006 phpBB Group
|