如何使用 Eclipse 运行命令更改 stdin Stream?
我正在开发一个项目,在该项目中,我不应该使用命令行参数,而应该将文件通过管道传输到标准输入,并将输出通过管道传输到另一个文件。
即我需要运行类似的命令:
./program < infile.txt > outfile.txt
有没有办法向 Eclipse 指定这是运行时我想要的命令?
我正在运行 Eclipse-C/C++ 环境。
I'm working on a project where rather than using command line arguments I am supposed to just pipe a file to stdin and pipe output to another file.
ie I need to run something like:
./program < infile.txt > outfile.txt
Is there a way to specify to Eclipse this is the command I want when it is run?
I am running the Eclipse-C/C++ environment.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 Eclipse 一段时间后,似乎没有一种简单的方法可以做到这一点。我只是添加调试代码来指定文件,然后将其声明为输入流。
After using Eclipse for some time, it seems like there is not a straightforward way of doing this. I've resorted to just adding debug code to specify a file and then declare it as an input stream.