Hello everyone,
I'm having a little problem when running a console program in PowerShell ISE: when the program writes out a line in portions using flush, PowerShell won't show the line until the program writes a line ending. For example the program is doing something like this (C++):
std::cout << "Doing something time-consuming..." << std::flush;
// Do something for some time
std::cout << " done in " << x << " seconds" << std::endl;
And PowerShell ISE will only show the whole line when this section of code completes. With non-ISE PowerShell this doesn't happen, the line is printed in portions as expected.
So the question is: can I somehow make PowerShell ISE disable its internal buffer and print the program's stdout directly?
Thank you.