#include <conio.h>
#include <iostream.h>
#include <string.h>
typedef unsigned char BYTE;
class string
{
public:
char str[255];
string();//constructor
string(char s[]);
string(char s,BYTE n);
void string::operator =(char s[]);
string string::operator +(char s[]);
};//end of class
void string::string(void)
{
str[0]=NULL;
}
void string::string(char s[])
{
strcpy(str,s);
}
void string::string(char s,BYTE n)
{
int t=0;
for (int i=0;i<n;i++,t++)
str[t]=s;
}
void string::operator =(char s[])
{
strcpy(str,s);
}
string string::operator +(char s[])
{
string temp;
strcpy(temp.str,str);
strcat(temp.str,s);
return temp;
}
//**************************************************************
void main()
{
clrscr();
string s="Ashiyane Security Team";
string t("adminrasul");
s=s+" 2010";
cout<<s.str<<endl<<t.str;
getch();
}