Date: Wed, 22 Jun 1994 22:32:21 +0000 (GMT) From: Vanni Zatta Subject: I/O in class To: djgpp AT sun DOT soe DOT clarkson DOT edu (Indirizzo gruppo djgpp) I'm copiling a my program by djgpp. I have 2 file: list.h and list.cpp In list.h I have: ... template class List { public: friend ostream& operator << (ostream& , List&); ... } #include; #end In file list.cpp I have template ostream& operator << (ostream& s, List& l) { ... ... } When I compile appear this message: proval.cc(.text+6c): undefined reference to '__ls__FR7ostreamRt5List17i' If I fuse 2 file: template class List { public: friend ostream& operator << (ostream& s , List& L) { ... return s; } is all right and program goes. Why ? Where I wrong ? Thanks, Vanni