MSVC6 & Templates
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;
};
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement