Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++

Name: Anon 2009-01-28 2:07

Hey, I am a complete noob to c++, and I need to know how to add strings.

Eg, I have:
a="one"
b="two"
c="three"

and I would like "d" to equal "onetwothree".

Thank you for any help

Name: Anonymous 2009-01-28 15:34

>>13
After first strcat your string will be "one". When you call strcat the second time, it will have to walk this "one" string to find where it ends and where to append your "two". Third call will have to walk "onetwo" to find its end. You don't need that, you already know when string ends when you append something to it. I'm not going to provide assembly, look at the benchmark one post higher.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List