Been working with operator overloading for the first time and am running into quite the standstill with this one. I finally got rid of the code I had written and decided to start from scratch. If anyone has any advice on how to code this for me it be a great help for me to see an example on how this would work.
This is what I need to do for it.
MyString MyString::operator+(const MyString& rightOp) const
The addition operator should be overloaded to take two MyStrings, concatenate their text together, and return a new MyString that contains the result.
Here is what I originally had if this helps anyone solve my issue.
MyString MyString::operator+(const MyString& rightOp) const
{
strcat(this->stringStorage, rightOp.stringStorage);
return *this;
}