how to append two string?
i have one string variable svcName="serviceName"
and i have to appe开发者_开发技巧nd "Base"
this string at the end of svcName
string. and store into another string.
#include <string>
std::string s = "abc";
s += "def";
string::append
If you require more complex string building, you could also use an std::stringstream
.
精彩评论