Difference between + operator and append function for string class object in c++?

Viewed 4142

We can add two string class object let's say

string str1="hello"
string str2="world"

string final =str1+str2;

or

string f=str1.append(str2);

What is the difference between these two methods?? order in which they add or implementation or anything else??

4 Answers
Related