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

amazon web services - S3 and apache mod_proxy with basic authentication -

How to install ruby on rails -

powershell - This solution contains one or more assemblies targeted for the global assembly cache -