M
Mat DeLong
Can someone explain this error to me? :
main.cpp:9: instantiated from `void show(const LIST::List<T>&) [with T =
int]'
main.cpp:23: instantiated from here
list.cpp:58: error: dependent-name `LIST::List<T>::ListIterator' is parsed
as a non-type, but instantiation yields a type
..........
This is the first part of the main:
#include "list.h"
#include <iostream>
using namespace std;
using namespace LIST;
template <typename T>
void show(const List<T>& m) {
for(List<T>::ListIterator i = m.begin(); i != m.end(); ++i) cout << *i;
}
------------------------
Thanks
Mat
main.cpp:9: instantiated from `void show(const LIST::List<T>&) [with T =
int]'
main.cpp:23: instantiated from here
list.cpp:58: error: dependent-name `LIST::List<T>::ListIterator' is parsed
as a non-type, but instantiation yields a type
..........
This is the first part of the main:
#include "list.h"
#include <iostream>
using namespace std;
using namespace LIST;
template <typename T>
void show(const List<T>& m) {
for(List<T>::ListIterator i = m.begin(); i != m.end(); ++i) cout << *i;
}
------------------------
Thanks
Mat