To instantiate a template, the compiler has to have the source available. You hid the definitions of the constructor and destructor from it by putting it in b.cpp, so while it got the class definition when you included the .h, it did not have the function definitions. You got the error at the link stage for the same reason you would with a normal function; when the compiler sees a function declaration without a definition, it assumes the function will be linked later. To fix this remove the #include from b.cpp and either move its contents into b.h or #include b.cpp in b.h. Obviously those are the same as far as the compiler is concerned. I would suggest you consult your favorite C++ text if you need more information; you should have a starting point now. -Heschi
> I use g++ (GCC) 3.2.2. > What did I wrong ? > > regards, > Akos > > -- > [EMAIL PROTECTED] mailing list > -- [EMAIL PROTECTED] mailing list
