#include <iostream>
using namespace std;
class CA
{
public:
CA(int b, char *cstr)
{
a = b;
str = new char[b];
strcpy(str, cstr);
}
CA(const CA& Other)
{
a = Other.a;
str = new char[a];
if(str!=0)
strcpy(str,Other.str);
}
CA & operator = (CA & Other)
{
if(this == &Other)
return *this;
a = Other.a;
delete []str;
str = new char[a];
strcopy(str, cstr);
return this;
}
~CA()
{
delete str;
}
private:
int a;
char *str;
};