Nap
Nap

Reputation: 8276

Where does the cout go on Winform Application

I am trying to use the libusb to a WinForm application.

I used several sample codes that uses a lot of standard output stream notations for debugging.

cout<<"Interfaces: "<<(int)config->bNumInterfaces<<" ||| ";

This codes would print on the console for linux or command line app. But for Winform, where does this go? I would like to know if I could set my MSVC++ project so all cout or printf calls would print to the Output window similar to the Console::WriteLine() method.

Any suggestions?

Upvotes: 0

Views: 1632

Answers (1)

shf301
shf301

Reputation: 31404

The output still goes to the standard output stream. There is no console so you can't see it. However if you launched the process and redirected standard output (programatically) you would see it.

Use OutputDebugStream() to write to the output window. (Debug.WriteLine() in .NET)

Upvotes: 1

Related Questions