i have a problem that how to concatenate more than two string in operator overloading i write a code but it is not run
#include<iostream>
#include<conio.h>
using namespace std;
class count
{
private:
char str[50];
public:
count()
{
str[0]='r';
}
void input()
{
cout<<"Enter string = ";
cin.getline(str,50);
}
count operator +(count x,count y)
{
count t;
strcpy(t.str,str);
strcat(t.str,x.str);
strcat(t.str,y.str)
return t;
}
void show()
{
cout<<"string is = "<<str<<endl;
}
};
int main()
{
count x,y,z,l;
x.input();
cout<<endl;
x.show();
cout<<endl<<endl;
y.input();
cout<<endl;
y.show();
cout<<endl<<endl;
l.input();
z=x+(y+l);
cout<<endl<<endl;
cout<<endl<<endl;
z.show();
getch();
return 0;
}
it is not working