I have a large program written in C++ that uses std::cout
in a lot of places. I am building an NCurses version and std::cout
destroys that interface.
Is there a way to reroute the console output from std::cout
to something like cdk_swindow?
I have a large program written in C++ that uses std::cout
in a lot of places. I am building an NCurses version and std::cout
destroys that interface.
Is there a way to reroute the console output from std::cout
to something like cdk_swindow?
A simple way to do this would be to override the << operator. This way in your case you can use cdk_swindow
I rememeber std:cout
didn't work in ncurses framwork and i use printf function
, you use a regex
with sed
and convert you std:cout to printf function
.But it's hard code and dirty anyway.
I'd look at the CDK examples (http://invisible-island.net/cdk/)
Since CDK 'takes over' an Xterm, you probably will want to create a wrapper function that spews the text that used to go to the console, into something like CDKVIEWER.