C++ string知識點

string的概念及特性: string是STL的字符串類型,一般用來表示字符串。在c語言中,咱們一般用char*表示字符串ios 特性: char* 是一個指針,string是一個類 (string封裝了char*,管理這個字符串,是一個char*型的容器) string封裝了不少實用的成員方法 (查找find、拷貝copy、刪除delete、替換replace、插入insert) 不用考慮內存
相關文章
相關標籤/搜索