class MyString:public string
{
public:
MyString(){ string();}
MyString(const char* name){
string(name);
}
MyString(const MyString& a){
*this = a;
}
MyString(const string& a):string(a){}
MyString operator()(int start,int end){
MyString ret(substr(start,end));
return ret;
}
};
when I write this, it shows that
‘const char* name’ previously declared here
10 | MyString(const char* name){
| ~~~~~~~~~~~~^~~~
and string(name);
|
what should I do?
just like words written above