   Interface Question
  Hiya,Is it possible to create a C++ interface which overloads the insertion << operator, and use the interface directly, without the 'concrete' inherited class? Something like the following:class IInterface{public:    // pure virtual << operator - is this legal?    virtual template < typename T >    inline IInterface* operator<< ( const T &t ) == 0;};class MyClass : public IInterface{public:    template < typename T >    inline MyClass* operator<< ( const T &t ) { /* implement here */ }};// a function that does somethingvoid UseTheInterface( IInterface i ){    i << "Foo";}// usage - is this legal?void main(){    MyClass class;    UseTheInterface( class );}I've never tried this before, and I seem to remember that to use a template class or method you need an implementation. Is this correct?I hope that was clear enough! Many thanks for any explanations [smile]James.   
  virtual functions cannot be template functions.   ;  Templated classes are created during compile time. Virtual methods are run-time or dynamic binding.   