This is my main
1 2 3 4 5 6 7 8 9 10 11 12 13
|
#include "LinkedList.h"
#include <string>
#include <iostream>
using namespace std;
int main()
{
LinkedList <int>list;
list.insertElement(3);
list.insertElement(7);
cout << "The most recently insterted element is, " << list.getElementAt(1) << " ";
}
|
And I get these errors when I run that.
/tmp/ccuZ68zn.o: In function `main':
Main.cpp:(.text+0x11): undefined reference to `LinkedList<int>::LinkedList()'
Main.cpp:(.text+0x22): undefined reference to `LinkedList<int>::insertElement(int)'
Main.cpp:(.text+0x33): undefined reference to `LinkedList<int>::insertElement(int)'
Main.cpp:(.text+0x44): undefined reference to `LinkedList<int>::getElementAt(int)'
Main.cpp:(.text+0x78): undefined reference to `LinkedList<int>::~LinkedList()'
Main.cpp:(.text+0x93): undefined reference to `LinkedList<int>::~LinkedList()'
collect2: ld returned 1 exit status
Thanks again for your help, I tried it that way before and these were the errors.