samedi 13 juin 2015

in iterator i have expected primary-expression before 'int'

List<int> list;
// Insert elements to the beginning of the list:
ASSERT_NO_THROW(list.insert(1, list.begin())); // 1
ASSERT_NO_THROW(list.insert(2, list.begin())); // 2 1
// Insert elements to the end of the list:
ASSERT_NO_THROW(list.insert(3, list.end())); // 2 1 3
ASSERT_NO_THROW(list.insert(4, list.end())); // 2 1 3 4
// Can't dereference an iterator pointing to the end of the list
ASSERT_THROW(ListExceptions::ElementNotFound, *list.end());
Iterator<int> iterator = list.find(IntEquals(1));


in line: Iterator iterator = list.find(IntEquals(1)); i get the error : expected primary-expression before 'int'

Aucun commentaire:

Enregistrer un commentaire