这是对的?
class SearchString : public NString {
DataForSearchInString dataForSearchInString;
public:
SearchString():NString(){}
SearchString(const char * data):NString(data){}
SearchString(const SearchString & other) : NString(other), dataForSearchInString() {}
SearchString& operator=(const SearchString& other)
{
NString::operator=(other);
dataForSearchInString.setBegin(other.getBegin());
return *this;
}
// if will be classes - children or there any virtual function then need to write "virtual ~SearchString() {}" here
// Some functions
inline const int getBegin() const {return dataForSearchInString.getBegin();}
};