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-30 0:30

String a = "one";
String b = "two";
String c = "three";

StringBuilder s = new StringBuilder();
s.append(a).append(b).append(c);
String d = s.toString();


I benchmarked this and it's 3% faster than >>42. Enjoy your poor performance, C fans.

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