Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

Shannon Barber

MSVC6 & Templates

This topic is 6745 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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<CCity> llCities; //LinkedList<CPlayer> 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<Element> friend struct TNode<Element> private: TNode<Element>* First; TNode<Element>* Last; long Items_in_Container; static const MEMORY; };

Share this post

Link to post
Share on other sites
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

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!