|
|
Nicolas Alvarez <nic### [at] gmailcom> wrote:
> If you're writing C, you should use strtol instead. If you're writing C++,
> you should use a stringstream instead.
As I said in my other post, there is merit in the C functions: They are
much more efficient than stringstreams.
So if you are converting a *huge* amount of strings to ints in a tight
loop, you might want to consider the C functions rather than stringstreams.
In situations where speed has absolutely no relevance stringstreams are
much easier and safer to use.
--
- Warp
Post a reply to this message
|
|