Hello,
I'm trying to make use of iterators in my linked list. I've read up on them but never used them. I thought I was declaring this right but apparently not:
1 2 3 4 5 6 7 8 9 10 11
#include <list>
#include "Accounts.h"
usingnamespace std;
int main
{
list<Accounts> Accounts;
list<Accounts>::iterator it;
return 0;
}
From what I understand, the iterator class should be included with the list class. This list is a list of Account objects which i've created. When I try to create the iterator my compiler (Dev C++ on Windows XP) gives me the following error:
"type/value mismatch at argument 1 in template parameter list for template<class_Tp, class_Alloc> class std::list"
"expected a type, got Accounts"
"template argument 2 is invalid"
"iterator does not name a type"