468,771 Members | 1,553 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,771 developers. It's quick & easy.

Where does Console::write() output text appear?

Hi. I've got a C++ program written in Visual C++ 2003. The program is
trivial, created with the Program-creation wizard: used the .NET "Form"
template. The program has a trivial single-pane form GUI.

I've got some stdout print statements in the code ... but I cannot find
where in the world the output text is appearing. For printing I tried both:

printf ("Hello world\n");
and
Console::Write ("Hello World\n");

I was expecting the output text to appear in the Visual C++ "Output" window:
there are two choices there: Debug and Build, but my output text is in
neither.

I understand that my program is not, strictly speaking, a "console program",
but certainly there must be a way to write text to stdout and veiw it?

Question: Where does output text appear when written with Console::Write()
or printf()?

Nov 17 '05 #1
1 4545
noleander wrote:
Hi. I've got a C++ program written in Visual C++ 2003. The program
is trivial, created with the Program-creation wizard: used the .NET
"Form" template. The program has a trivial single-pane form GUI.

I've got some stdout print statements in the code ... but I cannot
find where in the world the output text is appearing. For printing
I tried both:

printf ("Hello world\n");
and
Console::Write ("Hello World\n");

I was expecting the output text to appear in the Visual C++ "Output"
window: there are two choices there: Debug and Build, but my output
text is in neither.

I understand that my program is not, strictly speaking, a "console
program", but certainly there must be a way to write text to stdout
and veiw it?

Question: Where does output text appear when written with
Console::Write() or printf()?


It goes to stdout, which would be the console if you'd developed a console
program. If you run under the debugger, stdout from WinForms app goes to
the Output window in the debugger. If you're not running under the
debugger, it goes to the bit bucket. In an unmanaged Windows application
(non-console application) it goes to the bit bucket unless you send it
somewhere else (WinForms does it for you - in native code, you're on your
own).

-cd
Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Unemployed VC++ guy | last post: by
2 posts views Thread by Boba | last post: by
8 posts views Thread by AMeador | last post: by
1 post views Thread by James | last post: by
5 posts views Thread by Larry Rebich | last post: by
27 posts views Thread by CarlosMB | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.