Buffered reading from stdin using fread in C

前端 未结 11 1533
梦谈多话
梦谈多话 2020-12-24 03:36

I am trying to efficiently read from the stdin by using setvbuf in `_IOFBF~ mode. I am new to buffering. I am looking for working examples

11条回答
  •  情歌与酒
    2020-12-24 04:21

    Mabe also take a look at this getline implementation:

    http://www.cpax.org.uk/prg/portable/c/libs/sosman/index.php

    (An ISO C routine for getting a line of data, length unknown, from a stream.)

提交回复
热议问题