C++
文章平均质量分 58
牧云小子
坦率的讲,我不是一个完美主义者,但我欣赏完美主义。
展开
-
C++中string erase函数的使用
C++中string erase函数的使用 erase函数的原型如下:(1)string& erase ( size_t pos = 0, size_t n = npos );(2)iterator erase ( iterator position );(3)iterator erase ( iterator first, iterator last );也就是说有三种用转载 2012-12-03 10:24:12 · 259 阅读 · 0 评论 -
c++ string 和 stl算法
toupper,tolower地球人都知道 C++ 的 string 没有 toupper ,好在这不是个大问题,因为我们有 STL 算法:string s("heLLo");transform(s.begin(), s.end(), s.begin(), ::toupper);cout transform(s.begin(), s.end(), s.begin(), ::转载 2012-12-03 10:11:42 · 507 阅读 · 0 评论 -
C++ String (一)
String classString objects are a special type of container, specifically designed to operate with sequences of characters.Unlike traditional c-strings, which are mere sequences of characters in原创 2012-12-03 10:54:10 · 241 阅读 · 0 评论 -
C++ String (二)
string ( );string ( const string& str );string ( const string& str, size_t pos, size_t n = npos );string ( const char * s, size_t n );string ( const char * s );string ( size_t n, char c );原创 2012-12-04 16:33:53 · 238 阅读 · 0 评论