Hallo, ich habe mir eine eigene Klasse geschrieben, die ich für Ausgaben auf den Bildschirm oder/und in ein File verwende. --- snip --- DebugLog& DebugLog::operator<<( ostream& (*out)(ostream&) ) { // output to console if( log_to_console == true ) { cout << (*out); } // output to log file if( log_to_file == true ) { file << (*out); } return *this; } DebugLog& DebugLog::operator<<( const string out ) { // output to console if( log_to_console == true ) { cout << out; } // output to log file if( log_to_file == true ) { file << out; } return *this; } template<typename T> string DebugLog::str( T str ) { stringstream sstr; sstr << str; return sstr.str(); } DebugLog& DebugLog::operator<<( int8_t out ) { return *this << this->str( (int)out ); } DebugLog& DebugLog::operator<<( uint8_t out ) { return *this << this->str( (int)out ); } DebugLog& DebugLog::operator<<( int16_t out ) { return *this << this->str( out ); } DebugLog& DebugLog::operator<<( uint16_t out ) { return *this << this->str( out ); } DebugLog& DebugLog::operator<<( int32_t out ) { return *this << this->str( out ); } DebugLog& DebugLog::operator<<( uint32_t out ) { return *this << this->str( out ); } DebugLog& DebugLog::operator<<( int64_t out ) { return *this << this->str( out ); } DebugLog& DebugLog::operator<<( uint64_t out ) { return *this << this->str( out ); } --- snap --- Es werden auch "endl", usw. unterstützt. Wie bekomme ich es hin, dass jetzt auch noch Manipulatoren unterstützt werden? Ich würde nämlich gerne folgendes machen: DebugLog debug; debug << setfill(' ') << setw(3) << i << endl; Viele Grüße Bastian