C++ question

NuclearFusi0n

Diamond Member
Jul 2, 2001
7,028
0
0
how do i append an int to a string? like i have a for loop going, and i want my string to read like, "thread2", nextloop: "thread3", nextloop: "thread4" etc...
 

Ameesh

Lifer
Apr 3, 2001
23,686
1
0
use sprintf inconjuction to whatever string concatitnation technique you are familiar with.
 

gopunk

Lifer
Jul 7, 2001
29,239
2
0
i don't know c++ well enough to answer off the top of my head, and i am too lazy to look up the refs, but really quickly, you should convert the int to a string then concactenate (sp?) the strings.

damn you ameesh
 

Ameesh

Lifer
Apr 3, 2001
23,686
1
0
Originally posted by: gopunk
i don't know c++ well enough to answer off the top of my head, and i am too lazy to look up the refs, but really quickly, you should convert the int to a string then concactenate (sp?) the strings.

damn you ameesh

0wn3d!