0

i have one string variable svcName="serviceName" and i have to append "Base" this string at the end of svcName string. and store into another string.

2
  • 7
    char* or std::string? Commented Mar 8, 2011 at 9:36
  • How to think? How to be intelligent? Commented Mar 8, 2011 at 14:08

3 Answers 3

4
#include <string> std::string s = "abc"; s += "def"; 
Sign up to request clarification or add additional context in comments.

Comments

2

string::append

Comments

2

If you require more complex string building, you could also use an std::stringstream.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.