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

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -