摘要: http://yantingting1219.blog.sohu.com/71850367.html cin 读取并忽略 非空白字符 之前所有的空白字符,然后读取字符直至再次遇到空白字符,读取终止。 /*sting对象接收流中字符*/#include <iostream>#include <string>using namespace std;int main(){ string str; cin... 阅读全文
posted @ 2012-12-13 21:40 helloweworld 阅读(392) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <string>#include <cstring>using namespace std;int main(int argc, char** argv){ string str("hello world!,pun.test?good"); for (string::size_type i=0; i!=str.size(); i++) { ... 阅读全文
posted @ 2012-12-13 17:43 helloweworld 阅读(337) 评论(0) 推荐(0) 编辑