MSVC6 & Templates

Started by
0 comments, last by Shannon Barber 23 years, 9 months ago
I thought VS6 was suppose to handle template debugging much better than its predecessors. I just wrote template code that I _know doesn''t work and it compiled & linked just fine... fpos The real problem is: I''m getting a linking error when I try to create more than one linkedlist<> from a template... but no linking errors if I create just one of them... #include "LinkedList.hpp" #include "Terrain.hpp" #include "Sky.hpp" #include "Player.hpp" #include "City.hpp" class CWorld { public: CWorld(); ~CWorld(); void SevenDays(); void Cities(long); protected: private: CTerrain* lpGround; CSky* lpSky; long CityCount; LinkedList&ltCCity> llCities; //LinkedList&ltCPlayer> llPlayers; }; It pukes on the commented list...(when its not commented...) Here''s the list: template class LinkedList { public: LinkedList(); LinkedList(const LinkedList&); ~LinkedList(); long Add(const Element&); long Remove(const Element&); friend class LinkedListIterator&ltElement> friend struct TNode&ltElement> private: TNode&ltElement>* First; TNode&ltElement>* Last; long Items_in_Container; static const MEMORY; };
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Advertisement
What a buggy pos; it works fine now... I added a varible name to a prototype...

long Add(const Element& Addme);

I think I'm gonna go download & install the lasted patch

Edited by - Magmai Kai Holmlor on June 24, 2000 11:29:00 PM
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

This topic is closed to new replies.

Advertisement