Здравствуйте, Chorkov, Вы писали:
C>Рискну посоветовать использовать:
C>C>class Log: public ofstream
C>{
C>public:
C> Log(char* szLogFn);
C> ~Log();
C> template<class C>
C> Log& operator<<(const C& c)
C> {
C> EnterCriticalSection(&csLog);
C> static_cast<ofstream&>(*this) << c;
C> flush();
C> LeaveCriticalSection(&csLog);
C> return *this;
C> }
C>private:
C>};
C>
Тогда компилятор говорит "error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'overloaded-function' (or there is no acceptable conversion)".