D
Dominik Fritz
Hi,
I have a template class which contains a nested class. The .cpp file is
included at the end of the header file. If I write the implementation of
a member function of my nested class in this .cpp file (i.e. not inside
the declaration of the class) the linker complains about a missing
symbol. If I write the implementation inside the declaration everything
is fine.
Any Ideas why this happens (I use VC++6)?
// myclass.h
template <typename T>
class myclass
{
class mynestedclass
{
void memberfunction () ;
}
}
#include myclass.cpp
//myclass.cpp
template <typename T>
void myclass<T>::mynestedclass::memberfunction ()
{
// some code
}
I have a template class which contains a nested class. The .cpp file is
included at the end of the header file. If I write the implementation of
a member function of my nested class in this .cpp file (i.e. not inside
the declaration of the class) the linker complains about a missing
symbol. If I write the implementation inside the declaration everything
is fine.
Any Ideas why this happens (I use VC++6)?
// myclass.h
template <typename T>
class myclass
{
class mynestedclass
{
void memberfunction () ;
}
}
#include myclass.cpp
//myclass.cpp
template <typename T>
void myclass<T>::mynestedclass::memberfunction ()
{
// some code
}