这是什么意思? 弗里德里希 - 请删除刚才的新闻 - 通过电子邮件回复。What do you mean with this?Friedrich--Please remove just-for-news- to reply via e-mail. 需要2次文件读取:一次计算行数, 选择一条随机线。这可以在读取文件时使用 (尽管不是最佳的,当然),但是对于流不可能。Requiring 2 passes of file reading: one to count the number of lines,one to choos a random line. This can be used when reading a file(although not optimal, ofcourse), but is not possible with streams. 你对此有何看法? What do you mean with this? 我认为OP意味着从标准输入而不是文件读取。 - :wq ^ X ^ Cy ^ K ^ X ^ C ^ C ^ C ^ CI assume the OP means reading from standard input, instead of a file.--:wq^X^Cy^K^X^C^C^C^C 这篇关于文件处理问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!