Original Post
could anyone tell me why this code:
#include <iostream.h>
template
class A
{
public:
class B
{
public:
void f();
};
};
template
void A::B::f()
{
cout << "hello\n";
}
void main()
{
A::B b;
b.f();
}
generate a linking error:
error LNK2001: unresolved external symbol "public: void __thiscall A::B::f(void)" (?f@B@?$A@H@@QAEXXZ)
it works fine without templates, but for my projects i need
some inner classes inside some of my collection classes
thanks.