C++
popma98
这个作者很懒,什么都没留下…
展开
-
cin.ignore()函数的用法
cin.ignore(a,ch)方法是从输入流(cin)中提取字符,提取的字符被忽略(ignore),不被使用。每抛弃一个字符,它都要计数和比较字符:如果计数值达到a或者被抛弃的字符是ch,则cin.ignore()函数执行终止;否则,它继续等待。它的一个常用功能就是用来清除以回车结束的输入缓冲区的内容,消除上一次输入对下一次输入的影响。比如可以这么用:cin.ignore(1024,'\n'),转载 2016-09-14 21:51:41 · 333 阅读 · 0 评论 -
UVA-146 ID Codes
It is 2084 and the year of Big Brother has finally arrived, albeit a century late. In order to exercise greater control over its citizens and thereby to counter a chronic breakdown in law and order,原创 2016-09-17 22:31:29 · 410 阅读 · 0 评论 -
UVA, 10336 Rank the Languages
难点在于:递归函数和输出; #include #include #include #include using namespace std; class Rank{ private: int length,width,ans=0; char c; vector v; int a[26][1000]; map m; //output c原创 2016-09-28 22:53:06 · 302 阅读 · 0 评论