摘要: 功能描述: 实现在字符串末尾拼接字符串 函数原型: string& operator+=(const char* str); //重载+=操作符 string& operator+=(const char c); //重载+=操作符 string& operaotr+=(const string& 阅读全文
posted @ 2024-12-14 23:09 Ricky001 阅读(18) 评论(0) 推荐(0)
摘要: 功能描述: 给string字符串进行赋值 赋值的函数原型: string& operator=(const char* s); //char*类型字符串 赋值给当前的字符串 string& operator=(const string &s); //把字符串s付给当前的字符串 string& ope 阅读全文
posted @ 2024-12-14 21:53 Ricky001 阅读(53) 评论(0) 推荐(0)