is there a way to use an input file instead of stdin while debugging with VSlick?
I am trying to debug a C++ program that accepts input from stdin (using getch()). I need to debug 开发者_Go百科it using VSlick and an input file. I need something that would run as if i ran my program like so: myProgram < myInputFile
but obviously, within Vslick.
i tried using the '< myInputFile' as command line arguments but to no avail.
10x
Here is something u can do
freopen("input.txt","r",stdin); //For input from input.txt
freopen("output.txt","w",stdout); //for output to output.txt
In Project properties (tools), you can define your command line for Debug and Execute.
精彩评论