Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Simple question about string type (http://www.velocityreviews.com/forums/t449670-simple-question-about-string-type.html)

peter_k 11-09-2005 04:22 PM

Simple question about string type
 
Hi

In my program i have:

string s;
int i;

how can i easily add integer type to s ??

for example if i have int i = 5, i want to have after this string s =
"5"


deane_gavin@hotmail.com 11-09-2005 04:32 PM

Re: Simple question about string type
 
peter_k wrote:
> Hi
>
> In my program i have:
>
> string s;
> int i;
>
> how can i easily add integer type to s ??
>
> for example if i have int i = 5, i want to have after this string s =
> "5"


http://www.parashift.com/c++-faq-lit....html#faq-39.1

There's lots of useful information like that in the FAQ

Gavin Deane


Greg Comeau 11-11-2005 09:34 PM

Re: Simple question about string type
 
In article <1131553324.177231.242550@g49g2000cwa.googlegroups .com>,
peter_k <asm3@o2.pl> wrote:
>In my program i have:
>
>string s;
>int i;
>
>how can i easily add integer type to s ??
>
>for example if i have int i = 5, i want to have after this string s =
>"5"


Check out http://www.comeaucomputing.com/techtalk/#noitoa
--
Greg Comeau / Celebrating 20 years of Comeauity!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?


All times are GMT. The time now is 05:41 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.