By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,905 Members | 1,293 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,905 IT Pros & Developers. It's quick & easy.

Simple question about string type

P: n/a
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"

Nov 9 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

Nov 9 '05 #2

P: n/a
In article <11**********************@g49g2000cwa.googlegroups .com>,
peter_k <as**@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?
Nov 11 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.