我是 c 的新手,所以请多多包涵。
如何找出读取/写入读取的字符数?
我可以更具体地指定参数中读取/写入的字符数吗?如果是,怎么办?
最佳答案
来自 man(2) 阅读:
If successful, the number of bytes actually read is returned
来自 man(2) 写:
Upon successful completion the number of bytes which were written is returned
现在涉及:
Can I be more specific and designate the # of chars read/write reads in an argument? If so, how?
AFAIK 不,但可能有一些特定于设备/内核的方法,例如 ioctl(2)
关于c - 找出读取/写入读取的字符数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25645355/