M
maverick
Consider the following class
foo.h
---------------------------------------------------
#include <list.h>
using namespace std ;
template < class CFooTemp> class CFoo
{
CFoo();
~CFoo() ;
list<CFooTemp *> m_list ;
list<CFooTemp *> iterator :: iter ;
};
list<CFooTemp *> iterator :: iter ;
This line gives me a compiler error
error: expected `;' before "iter"
Any clues as to why this would happen ?
Now i change to primitive type such as int it compiles fine
foo.h
---------------------------------------------------
#include <list.h>
using namespace std ;
template < class CFooTemp> class CFoo
{
CFoo();
~CFoo() ;
list<CFooTemp *> m_list ;
list<CFooTemp *> iterator :: iter ;
};
list<CFooTemp *> iterator :: iter ;
This line gives me a compiler error
error: expected `;' before "iter"
Any clues as to why this would happen ?
Now i change to primitive type such as int it compiles fine