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

621 Views Asked by At
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'

0

There are 0 best solutions below