mardi 24 mars 2015

C++ template error


I keep getting this error when I make my program. I have no idea why. Any help is appreciated!



g++ -g -Wall main.cpp -o lab10
main.cpp: In function ‘int main()’:
main.cpp:22:29: error: no matching function for call to ‘LList<Pokemon>::get(int&)’
main.cpp:22:29: note: candidates are:
llist.h:113:4: note: T& LList<T>::get(T) [with T = Pokemon]
llist.h:113:4: note: no known conversion for argument 1 from ‘int’ to ‘Pokemon’
llist.h:119:11: note: const T& LList<T>::get(T) const [with T = Pokemon]
llist.h:119:11: note: no known conversion for argument 1 from ‘int’ to ‘Pokemon’




Aucun commentaire:

Enregistrer un commentaire