What I\'m trying to do is basically:
./myProgram < myData.txt
While I\'m debugging with CLion IDE. I just can\'t find the option to do so.
<
Assuming your input file is myData.txt
, you can reopen/reuse the stdin
stream using freopen
freopen("myData.txt","r",stdin);
if you want to do the same with your output:
freopen("myOutput.txt","w",stdout);
this will work for std::cin, printf, etc...
You can find more information about this here: http://www.cplusplus.com/reference/cstdio/freopen/
By the way, there is already a feature request for this. If you are interested, you can vote here so it gets prioritized: https://youtrack.jetbrains.com/issue/CPP-3153