c++ - Put three string variable in one array -


i put 3 string variable in 1 array besides each other in c++. how can efficiently little code possible? in fact, must conversion of string class cstring type.

thanks in advance.

you can using following code:

string str1 = "testing"; string str2 = " string"; string str3 = " concatenation"; string output = str1 + str2 + str3; cout << output; 

output be:

testing string concatenation

hope helps.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -