摘要:
transform(first,last,result,op);//first是容器的首迭代器,last为容器的末迭代器,result为存放结果的容器,op为要进行操作的 阅读全文
posted @ 2019-07-16 11:21
MoonXu
阅读(210)
评论(0)
推荐(0)
摘要:
at()//遍历 length()//长度 begin() end()//迭代器 str.copy(buf, 7, 4) //拷贝str下标为4开始的7的字符 c_str()//c风格字符串 s1.append(s2);//拼接 s5.find("hello", 5);//从下标5开始查找首次出现h 阅读全文
posted @ 2019-07-16 11:20
MoonXu
阅读(259)
评论(0)
推荐(0)
摘要:
#include <iostream>#include <string> using namespace std;int main(int argc, const char * argv[]) { //string str("abcdefg"); string str = "abcdefg"; // 阅读全文
posted @ 2019-07-16 10:30
MoonXu
阅读(4192)
评论(0)
推荐(0)
摘要:
#include <iostream> using namespace std; int main(int argc, const char * argv[]) { //通过const char * 初始化 string s1 = "aaaa"; //构造函数初始化 string s2("bbbbb 阅读全文
posted @ 2019-07-16 10:26
MoonXu
阅读(4162)
评论(0)
推荐(0)

浙公网安备 33010602011771号