Search code examples
c++eclipse-cdtcevelop

How to specify standard input to Cevelop/EclipseC/C++ when running the program?


I currently have the input file hard coded in the C++ code:

     constexpr auto SELECTED_COLLEGES {"rva-ceeb-working.txt"};
     std::ifstream ifs {SELECTED_COLLEGES, std::ios::in};

I intend to change the code to use standard input instead. When I run the program from the command line I will specify the file as:

     $ aptcp <rva-ceeb-working.txt

How do I tell Cevelop/EclipseC/C++ that when it runs the program to use rva-ceeb-working.txt for standard input?

Cevelop C++ IDE
Version: 1.8.0-201707131430

Eclipse C/C++ Development Tools
Version: 9.3.0.201706122201
Build id: @build@

Eclipse Help
Version: 2.2.100.v20170612-0950
Build id: I20170612-0950

OS: Linux, v.4.10.0-37-generic, x86_64 / gtk 3.22.11

Solution

  • Run > Run Configurations... > Common > Input File

    enter image description here