开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜