Str Str:: operator+(const Str & append) const
{
unsigned i,j;
for(i=0,j=0 ; i<append.used; i++ ,j++)
temp[i]=append.data[j];
for(j=0 ; i<used; i++, j++)
temp[i]=data[j];
temp[i]='\0';
}
used and append.used are the length of strigs. and data is pointer to array.
Hi
I am trying to concatenate two strings in the class using temperory pointer temp. but it is not printing anything.Could you tell me what is wrong with my for loops because program works wit actual strcat().