![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++String
nuoshueihe
这个作者很懒,什么都没留下…
展开
-
char array string
Count spaces, punctuation, digits, and letters#include #include using namespace std;int main() { const char *str = "This is a test. 1 2 3 4 5"; int letters = 0, spaces = 0, punct = 0, digi原创 2012-11-29 14:42:22 · 512 阅读 · 0 评论 -
String常用函数介绍
向string 的后面加字符或字符串。(比+=, push_back 更灵活)(1)向string 的后面加C-stringbasic_string& append( const value_type* _Ptr );string s ( "Hello " ); // s=”Hello ”const char *c = "Out There ";s.append ( c );原创 2012-11-29 14:45:32 · 648 阅读 · 0 评论 -
sort instance
#include #include #include #include using namespace std;void print(vector& vec){ vector::iterator it; for(it=vec.begin();it!=vec.end();it++) { cout << *i原创 2012-12-06 10:10:56 · 409 阅读 · 0 评论 -
<cstdlib> (stdlib.h)
FunctionsString conversion:atofConvert string to double (function )atoiConvert string to integer (function )atolConvert string to long integer (function )atollConvert string原创 2012-12-20 10:14:51 · 513 阅读 · 0 评论