In my application I have a console (which uses std::out) and a window (that has a function to show some text). What I'm looking for is a way to show the last line of cout in my window. I've read some articles about making a custom streambuf class or a struct that simply overloads the << operator. I can't overload the << operator because I'm not able to use things like endl if I do so.
Another post here suggest to define my own streambuf but I don't know if that's a good solution for my problem. Maybe someone can give me an advice on how I should implement this feature.