Someone
public text v1 · immutableperson &operator~() //Doppelte Telefonnummern beseitigen
{
for(int i=0; i<getat(); i++)
{
for(int k=0; k<getat(); k++)
{
if(strcmp(this->tel[i], this->tel[k])==0)
{
if(k==i)
continue;
if(k+1>=getat())
{
this->tel[k]=0; // danach
this->at--; // gehts nit mehr
}
else
{
this->tel[k]=new char[strlen(this->tel[k+1])+1];
strcpy(this->tel[k], this->tel[k+1]);
this->tel[k+1]=0;
this->at--;
}
cout<<this->tel[k]<<" doppelt"<<endl;
cout<<"bla";
}
}
}
}