我想问一下是否有可能在 CLion 中运行带有自定义参数的代码。以及将 file.txt 放在项目文件夹中的位置。
相当于./program <file.txt
的东西
最佳答案
似乎还没有实现要运行或调试的程序的stdin
重定向。查看问题"Add an option to specify default input and output streams for console applications"在 JetBrain 的 bugtracker 上。
其他 IDE(例如 Eclipse)可以执行此操作。
关于c - 在 CLion 中使用 stdin 运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58624409/