Boost logo

Boost :

Subject: Re: [boost] Concatenating int value to string ..??
From: Rob Stewart (robertstewart_at_[hidden])
Date: 2013-11-02 07:48:42

On Nov 2, 2013, at 4:44 AM, Rahul Mathur <srivmuk_at_[hidden]> wrote:

> I wish to have string (combination of string value and int value) which increments until 100. The code is as below -

[snip code trying to use lexical_cast to parse a string as an int]

This question is off topic for the developer's list.

That aside, and apart from the other suggestions made about how to use lexical_cast, I'd suggest considering snprintf(); the result will be more efficient.


(Sent from my portable computation engine)

Boost list run by bdawes at, gregod at, cpdaniel at, john at