开发者

is there a way to use an input file instead of stdin while debugging with VSlick?

开发者 https://www.devze.com 2023-03-27 15:08 出处:网络
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

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

精彩评论

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