input of a program from file but no output on stdout

I did this


1
2
3
4
5
6
7
8
9
10
    
prog.exe <input.txt> output.txt
//This works fine, that is output goes to the file

prog.exe <input.txt> cout
//OR
prog.exe<input.txt> stdout

//These don't work, that is the program works fine but no output is shown in cmd
  


How do i make sure that output is produced in cmd/stdout?
Last edited on
How do i make sure that output is produced in cmd/stdout?
For windows use con device:

prog.exe < con > nul receives input from console and send output to nothing


BTW, cin/stdin (and out counterparts) are standard streams which can be redirected by OS.
so in prog.exe <input.txt> output.txt output.txt is your stdout
Last edited on
This did it.
Thanks a ton!
Topic archived. No new replies allowed.