开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜