Code:void String::operator+=(const String& rhs) { unsigned short rhsLen = rhs.GetLen(); unsigned short totalLen = itsLen + rhsLen; String temp(totalLen); unsigned short i; for (i = 0; i<itsLen; i++) temp[i] = itsString[i]; for (unsigned short j = 0; j<rhs.GetLen(); j++, i++) temp[i] = rhs[i-itsLen]; temp[totalLen]='\0'; What is this doing here? is it assigned the value of totalLen, meaning the the two strings to temp or what? *this = temp; }



LinkBack URL
About LinkBacks


