close
class CTest{
std::ostream debug_message;
explicit CTest():debug_message( cout.rdbuf() ){} ;
~CTest(){};
void Print(){
debug_message << endl << " this line will print on screen " << endl;
debug_message.clear(ios::failbit);
debug_message << endl << " this line cannot show " << endl;
debug_message.clear(ios::goodbit);
debug_message << endl << " Show this line again " << endl;
}
}
全站熱搜
留言列表