User forums > Using Code::Blocks
Redirect std::cout
LordCB:
Dear mr. TDragon
--- Quote ---Translation:
You can't do that.
--- End quote ---
really??
I can do it.... ;o)))
thomas:
Sure. You could also write a plugin which installs a logger that listens on a pipe... but that's not the point. What TDragon was saying is that Code::Blocks wasn't made for that kind of stuff. 8)
The sensible way of watching variables and controlling program flow is to use the debugger, because that's what it's for, and it's something that already works, and it works well.
LordCB:
Dear dmoore,
I try out your suggestion. It works fine thanks very much...
LordCB:
Dear dmoore,
where can I get the sources of your plugin.
CuteAlien:
I
--- Quote from: thomas on December 06, 2008, 12:21:34 am ---The sensible way of watching variables and controlling program flow is to use the debugger, because that's what it's for, and it's something that already works, and it works well.
--- End quote ---
There are many situations where cerr works better than a debugger. If you have time-outs, if you have to print lots of data or realtime data, threads are a pain and not to forget the rather regular gdb crashes with c++.
But anyway - my solution for that is rather trivial. If I need cerr output, then I start the application from console :-) Having both - debugger + console would certainly be nicer, but so far I got by without it. In Windows you can also start your application as console applications. You have to replace WinMain by main as entry point into your application then you get a console output.
Navigation
[0] Message Index
[*] Previous page
Go to full version