theme

" जीतने वाले छोड़ते नहीं और छोड़ने वाले जीतते नही "

Monday, March 12, 2012

*Program to concatenatetwo strings By overloading + operator

#include
#include
class concat
{
char st[20];
public:input()
{
cout<<"enter a sting"; cin>>st;
}
void operator +(concat &c)
{
strcat(st,c.st);
cout< }
};
main()
{
concat c1,c2;
c1.input();
c2.input();
c1+c2;
}

No comments:

Post a Comment