2016年4月7日
摘要: void resize (size_t n); void resize (size_t n, char c);测试代码: // resizing string #include #include int main () { std::string str ("I like to code in C"); std::cout << str << '\n'; unsigned s... 阅读全文
posted @ 2016-04-07 19:24 小小八 阅读(1236) 评论(0) 推荐(0) 编辑
摘要: 题目链接:单词问题 找一个字符串里的所有单词,重复的只输出一次。关于map函数key值是字符串的问题一直比较含糊... 挣扎了一番,大概是,map的key值是char型数组的时候,标记的是地址,于是有map[char *, int]mp;然而..这就并没有什么卵用了吧.. 然后...如果是strin 阅读全文
posted @ 2016-04-07 11:14 小小八 阅读(313) 评论(0) 推荐(0) 编辑