 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can concatenate two strings by operator overloading in C++. Before starting, you can note my information. You can connect with me by following these details which are available in front of you. Now coming on to the topic. In this video, I am going to demonstrate you how you can concatenate strings by overloading operators in C++. Here iostream header file is included. Then string header file is included. Then I have used a namespace std. Name of class is string in which an attribute str is declared. Then you can see two functions are defined. First function is read which will display enter a string message on console. Then the entered string will be stored inside str. Then print function is implemented. It will display the text which is available inside str on console using this cout statement. After these two functions, I have implemented third overloaded operator function definition that is operator plus. Here plus is the operator which is overloaded. Operator is a keyword. Its return type is string. It will return an object. This string x will receive an explicit argument. Now inside definition, you can see I have declared an temporary object that is string t. First I have copied values of str. This str is representing implicit arguments value. This str will be copied into t.str. Then using strcat, x.str is concatenated into t.str. So first implicit argument is copied into t and then explicit argument is concatenated into t. So t object is containing values of implicit as well as explicit arguments. Here in main function you can see this function called here plus is overloaded. Implicit argument is s1 and s2 is explicit argument. So this str is representing s1 value and x.str is representing s2 value. Both are available inside t. Then t will be returned. The values will be stored inside s3 object. Before this function call, s1 and s2 both are calling read function and after this function calling s3 is calling print function. So that concatenated values will be displayed on console. Now I am going to execute this code. It is asking for first string. I am entering Sanjay. It is asking for second string. I am entering Gupta. You can see the output string is Sanjay Gupta. So both strings are concatenated by overloading plus operator in this program. So I hope you have understood how you can overload plus operator to concatenate values of two string objects. If you want to watch more programming related videos, you can subscribe my YouTube channel that is Sanjay Gupta underscore tech school. Thank you for watching this video.