Original Post
I have some code that tries to create a linked list out of vectors and using templates for the first time I guess it's inevitable that it'll be wrong =P.
The relevance (LinkedList.h):
LinkedList.h gets called in (and used only in) TileContainer.h where it's used to typecast some things.
TileContainer.h:
The errors:

I'm not quite sure what's wrong with it and the errors don't really help me (perhaps if I knew more about templates), so if anyone could point me in the right direction it'd me much appreciated.
The relevance (LinkedList.h):
#pragma once
#include <vector>
#include "Main.h"
template <typename T>
int FindEmptyID(std::vector<T*> &vector)
{
if(list.empty())
{
return DEFAULT_ID;
}
else
{
typename std::list<T*>::iterator i = list.begin();
int previousId = (*i)->ID();
i++;
for(; i != list.end(); i++)
{
int currentId = (*i)->ID();
if(currentId - previousId > 1)
{
return previousId + 1;
}
previousId = currentId;
}
return previousId + 1;
}
}
template <typename T>
T * cLinkedList <T>::ScanListPrevious(std::vector<T*> &vector, int ID)
{
T *previous = 0;
for(typename std::list<T*>::iterator i = list.begin() ; i != list.end() ; ++i)
{
T *object = *i;
if(object->ID() == ID)
{
return previous;
}
previous = object;
}
return 0;
}
template <typename T>
T * cLinkedList <T>::ScanList(std::vector<T*> &vector, int ID)
{
for(typename std::list<T *>::iterator i = list.begin(); i != list.end(); ++i)
{
T *object = *i;
if(object->ID() == ID)
{
return object;
}
}
return 0;
}
LinkedList.h gets called in (and used only in) TileContainer.h where it's used to typecast some things.
TileContainer.h:
#pragma once
#include "LinkedList.h"
#include "sSprite.h"
class LayerContainer
{
public:
int ID;
LayerContainer();
~LayerContainer();
private:
LayerContainer* layers;
};
class TileContainer
{
public:
sSprite background, middle, foreground; // Graphical rendering of the tile
int rowPos, colPos; // Position of the tile
int rowSpr, colSpr; // Position of the sprite from the sprite sheet to render
int ID;
int layerNum;
// Function declarations
TileContainer();
~TileContainer();
void AddTile(int row, int column, int size, int rowSpr, int colSpr);
void ChangeTileSprite(sSprite sprite, int depth, int ID);
void AddTileLayer(sSprite sprite, int row, int col);
void AddTileLayer(sSprite sprite, int ID);
private:
TileContainer* tiles;
};
typedef std::vector<LayerContainer> LayerContainer;
typedef std::vector<TileContainer> TileContainer;
The errors:

I'm not quite sure what's wrong with it and the errors don't really help me (perhaps if I knew more about templates), so if anyone could point me in the right direction it'd me much appreciated.