阅读背景:

C程序设计:如何读取来自stdin的终端输入?

来源:互联网 

So, I'm trying to write a c program that reads input piped into the program (through stdin), but I also need to be able to read input from the terminal (so I obviously can't read it from stdin). How would I do that? I'm trying to open another file handle to /dev/tty like this:So, I'm trying to write a c program that reads




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: