How to use my logging class like a std C++ stream?

前端 未结 5 1877
借酒劲吻你
借酒劲吻你 2020-12-24 15:34

I\'ve a working logger class, which outputs some text into a richtextbox (Win32, C++). Problem is, i always end up using it like this:

stringstream ss;  
ss          


        
5条回答
  •  天命终不由人
    2020-12-24 15:55

    In the Logger class, override the << operator.

    Click Here to know how to implement the << operator.

    You can also avoid the logging statements inside the code using Aspect Oriented programming.

提交回复
热议问题