template with friend function problem
Martin v. Loewis
martin@loewis.home.cs.tu-berlin.de
Mon Mar 20 14:23:00 GMT 2000
> What is wrong with my instantiation of friend functions?
In C++, at the point of instantiation, the definition of a template
function (or class) must be visible - just having the declaration is
not enough. As a result, you must define the template implementation
in the header file. This is most easily achieved by #including
Vector.C into Vector.h.
Hope this helps,
Martin
More information about the Gcc
mailing list