0

I am sure this has something to do with my templates. I am very rusty on that particular feature, but it could be something else, mostly due to not understanding what this error really means.

I have 4 errors

1>universe.obj : error LNK2019: unresolved external symbol "public: __thiscall LL<class Solar_System>::LL<class Solar_System>(void)" (??0?$LL@VSolar_System@@@@QAE@XZ) referenced in function "public: __thiscall Universe::Universe(class std::basic_fstream<char,struct std::char_traits<char> > &)" (??0Universe@@QAE@AAV?$basic_fstream@DU?$char_traits@D@std@@@std@@@Z)
1>universe.obj : error LNK2019: unresolved external symbol "public: __thiscall LL<class Solar_System>::~LL<class Solar_System>(void)" (??1?$LL@VSolar_System@@@@QAE@XZ) referenced in function __unwindfunclet$??0Universe@@QAE@AAV?$basic_fstream@DU?$char_traits@D@std@@@std@@@Z$0
1>universe.obj : error LNK2019: unresolved external symbol "public: __thiscall LL<class Empire>::LL<class Empire>(void)" (??0?$LL@VEmpire@@@@QAE@XZ) referenced in function "public: __thiscall Universe::Universe(class std::basic_fstream<char,struct std::char_traits<char> > &)" (??0Universe@@QAE@AAV?$basic_fstream@DU?$char_traits@D@std@@@std@@@Z)
1>universe.obj : error LNK2019: unresolved external symbol "public: __thiscall LL<class Empire>::~LL<class Empire>(void)" (??1?$LL@VEmpire@@@@QAE@XZ) referenced in function "public: __thiscall Universe::~Universe(void)" (??1Universe@@QAE@XZ)

universe.h

#ifndef UNIVERSE
#define UNIVERSE

#include <fstream>
#include "solar_system.h"
#include "empire.h"
#include "LL.h"
#include "race.h"

using namespace std;

class Universe{
public:
    Universe();
    Universe(fstream &save);
    ~Universe();
protected:
private:
    LL<Solar_System> list_uni_systems;
    LL<Empire> list_uni_empires;


};

#endif

LL.h

#ifndef EA_LINKEDLIST
#define EA_LINKEDLIST

#include "LL_Node.h"

template <class A>
class LL{
public:
    LL();
    ~LL();
    void add(LL_Node<A>);
    void remove();
    void next();
    void prev();
    void search(LL_Node<A>, LL_Node<A>*);
    bool find(LL_Node<A>);
    A get();
protected:
private:
    LL_Node<A> *head, *curr, *tail;
    int LL_ID_CODE;
};

#endif

if you need any of the other source let me know. any help or guidance or ideas would be a great help, thanks

Aries7
  • 46
  • 9

0 Answers0