J
jacob navia
Richard said:jacob navia said:
Richard Heathfield wrote:
[snip]
You are wrong. Windows provides support for stdin, stdout and stderrI think the situation was somewhat complicated by the mention of
Windows, since Windows might reasonably be regarded as what the
Standard calls a "freestanding implementation"; as such, it is not
required to provide support for stdin, stdout, and stderr, and AFAIK
it doesn't.
Well, I didn't say it very well, did I? I apologise for expressing
myself poorly. Yes, if you're writing a console program, you can have
your stdin, stdout, and stderr. But I was in fact thinking specifically
of Win32 API programs, programs that actually use the Windowiness of
Windows. Now, it's entirely possible that Windows programs (of the
WinMain variety, so to speak) can take advantage of stdin/stdout/stderr
support, but I was under the impression that they cannot.
The only difference between windows and console programs is that
for console programs the system calls for you the API AllocConsole();
and you start in a "Dos" window. Within a console program you can use
the whole windows API, open windows, call any API function just as any
other windows program.
In the other hand, for "windows" programs, the system does NOT open
a console, and if you want to use stdin stderr and stdout you have to
call the API AllocConsole(). That is the ONLY difference.