C++类的封装之 字符串MyString类

yxt39987 10 0 PDF 2021-01-15 21:01:58

包括了运算符重载<> = + == [ ] mystring.h #ifndef MYSTRING_H #define MYSTRING_H #include using namespace std; class MyString { friend ostream& operator<>(istream& in,MyString& ob); private: char *str; int size; public: MyString(); MyString(const char *str); MyString

用户评论
请输入评论内容
评分:
暂无评论