#include <iostream>
using namespace std;
class my_string
{
private:
char *str;
int len;
public:
my_string(){}//无参构造
my_string(char* s,int l):str(s),len(l){}//有参构造
my_string(my_string& s1){}//拷贝构造
my_string& operator=(my_string& s1){}//拷贝赋值函数
bool my_empty();//判空
int my_size();//长度
char* my_str();//转化为c风格字符串
};
bool my_string::my_empty()
{
if(len==0)
{
cout<<"enpty:"<<true<<endl;
return true;
}
else
{
cout<<"empty:"<<false<<endl;
return false;
}
}
char* my_string::my_str()
{
}
int my_string::my_size()
{
cout<<"len:"<<len<<endl;
return len;
}
int main()
{
char* a = "abcde";
//cout<<a<<endl;
int b=0;
while(1)
{
b++;
if(a[b]=='\0')
{
break;
}
}
my_string s1(a,b);
s1.my_empty();
s1.my_size();
my_string s2(s1);
my_string s3;
s3 = s2;
// cout<<b<<endl;
return 0;
}