Is there a way to simulate: yourprogram < inputFile.txt
in Visual Studio 2008?
Go to settings (ctrl+,) -> Search settings -> : Code-runner : Run in terminal - Check this and you will be able to run the code directly in the terminal which takes input. :) Show activity on this post.
The Output window displays status messages for various features in the integrated development environment (IDE). To open the Output window, on the menu bar, choose View > Output, or press Ctrl+Alt+O.
Answers. In the 'Solution Explorer' right click your 'project' (NOT the 'Solution' node at the top) and select Add > New Item. In the 'Add New Item' dialog, select "Text File" and give it a name (file.
When you've developed your application (e.g. a ConsoleApplication) you would normally start this from the Command Line with
ConsoleApplication1.exe < inputfile.txt
The part of the command < inputfile.txt
is the command line arguments to your application.
You can set these in your project properties
properties
Debug
tabIn the Start Options section enter
< Path/To/inputfile.txt
When you next launch your application with the debugger, it will execute your application with these Command line args
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With