摘要: 从大神处学习的,主要关键是sscanf函数的一个用法,就是遇到空格时,读入结束。还有gets函数的一个点,与scanf不同的是输入字符串是直到换行符时才结束,而scanf函数遇到空格时读入就结束了。@:http://acm.hdu.edu.cn/showproblem.php?pid=2072其中一个思想是用二维数组记录一行字符串,我觉得这个思想很好。#include <iostream>#include <string>using namespace std;char word[100];char arr[100][100];int main(){ int len,p 阅读全文
posted @ 2013-01-28 20:41 xshang 阅读(151) 评论(0) 推荐(0) 编辑