+ 1
How do use string in c++?
5 ответов
+ 6
string str = "cookies";
cout << str;
+ 6
The + operator is overloaded so for concat you simply do :
string str1;
string str2;
string str3 = str1+str2;
+ 1
declare a variable first:
string x;
assign a value for this variable:
x = "value is here";
if you want to show this value on screen
cout << x;
+ 1
concatination , copy substring