c++11 - in iterator i have expected primary-expression before 'int' -
list<int> list; // insert elements beginning of list: assert_no_throw(list.insert(1, list.begin())); // 1 assert_no_throw(list.insert(2, list.begin())); // 2 1 // insert elements end of 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 iterator pointing end of list assert_throw(listexceptions::elementnotfound, *list.end()); iterator<int> iterator = list.find(intequals(1));
in line: iterator iterator = list.find(intequals(1)); error : expected primary-expression before 'int'
Comments
Post a Comment