卿学姐的读入挂:http://www.cnblogs.com/qscqesze/p/5736748.html

手写getchar()

 1 inline char getcharc()
 2 {
 3     static const int BUFSIZE=100001;
 4     static char buf[BUFSIZE],*psta=buf,*pend=buf;
 5     if(psta==pend)
 6     {
 7         psta=buf;
 8         pend=buf+fread(buf,1,BUFSIZE,stdin);
 9         if(psta==pend)
10             return -1;
11     }
12     return *psta++;
13 }

 

相关文章:

  • 2022-12-23
  • 2022-01-13
  • 2021-07-16
  • 2021-11-11
  • 2021-11-26
  • 2022-03-04
  • 2022-12-23
猜你喜欢
  • 2018-08-21
  • 2022-12-23
  • 2021-05-24
  • 2022-12-23
  • 2021-09-12
  • 2022-12-23
  • 2021-12-29
相关资源
相似解决方案