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 · 271 阅读 · 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 · 511 阅读 · 0 评论 -
C++ String (一)
String class String 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 · 251 阅读 · 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 · 250 阅读 · 0 评论