
C基础
文章平均质量分 87
StoneXieAC
这个作者很懒,什么都没留下…
展开
-
数据快速读取 cin scanf getchar比较(包含freopen std::ios::sync_with_stdio详解 程序执行时间 )...
数据快速读取 cin scanf getchar比较(包含freopen std::ios::sync_with_stdio详解 程序执行时间 ) int read() { char c=getchar();int num=0; for(;!isdigit(c);c=getchar()); for(;isdigit(c);c=getchar()) num...转载 2018-09-07 15:57:00 · 326 阅读 · 0 评论 -
c/c++ 字符和字符串读入小结(gechar cin getline gets) by slj
c/c++ 字符和字符串读入小结(gechar cin getline gets) by slj getchar: 逐个字符读入,可以读入一切字符,包括空格符和回车符。这个函数很通用,可以代替以下所有函数。注意getchar连回车符都接受,接受回车符意味着可以判断读入的字符是不是'\n'。但以下所有函数都不接受空格符和回车符。 用法:char ch; ch=getchar(); c...原创 2018-09-07 10:54:00 · 269 阅读 · 0 评论