I am trying to make a gui application that hides a console application that uses menu. In order to do that, I want to capture stdout and replace it by a pipe and replace stin by a pipe. I tried the following sollution :
The problem with this solution is that I get all of the output only at the ending of the console application (I can't get the output byte by byte as it is sent to the screen).
An other thing to say is that the console app, I didn't write it bye my self (I can't change it)
It is possible that the buffer is very big and doesn't get flushed until it is full. It doesn't get full so it is only flushed at the end of the program.
Pity you can't change it. Adding a fflush(stdout) after each printf will get it to do what you want.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.