Also note that this is a link time error not compile time: Original code should compile successfully using -c command: gcc -c code.cpp
Your are facing a classic C++ problem. Replace following function declaration: friend ostream& operator << (ostream&,const Derived<T>&); to...
Separate names with a comma.