I have Microsoft Visual C++ and i don't know how to use redirection to input in a file. can anyone help.
Printable View
I have Microsoft Visual C++ and i don't know how to use redirection to input in a file. can anyone help.
what do you want to redirect?
I want to use an input file and use redirection to input that file to my written program during execution
Open the file with CreateFile and pass the handle of it as the input handle to a call of CreateProcess that launches your program.
Or write the command line like
myapp.exe < infile.txt
I think it still works.