I'm sure it's the syntax, but i just keep fidlin' wit it and it still won't work. it's an unresolved symbol error
edit: it's all in the same file by the way
Code:template<class _T> class BTree { //Forward Declaration public: class iterator; class in_iter; //Typedefs typedef _T * _Tpt; // Template pointer type typedef BTree<_T> _Bt; // BTree type typedef BTree<_T> * _Bpt; // Btree pointer type typedef iterator _ItB; // Iterator type base public: //Base class for all iterator types class iterator { public: _ItB operator=(const _Bpt); protected: _Bpt current; }; }; template<typename _T> BTree<_T>::_ItB /* <-- return type | definition --> */ BTree<_T>::iterator::operator=(const _Bpt srcTree) { current = &srcTree; return this; }
Edit: this may help if the error is not as obvious as i hope for it to be
Linking...
main.obj : error LNK2001: unresolved external symbol "public: class BTree<int>::iterator __thiscall BTree<int>::iterator:perator=(class BTree<int> * const)" (??4iterator@?$BTree@H@@QAE?AV01@QAV1@@Z)
Debug/btree02.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.



LinkBack URL
About LinkBacks
perator=(class BTree<int> * const)" (??4iterator@?$BTree@H@@QAE?AV01@QAV1@@Z)


