Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <list>
- using namespace std;
- int main() {
- list<int> l1;
- l1.push_front(1);
- l1.push_front(2);
- l1.push_front(3);
- l1.push_back(4);
- l1.push_back(5);
- list<int>::iterator it = find(l1.begin(), l1.end(), 10);
- if(it != l1.end()) {
- cout << *it << endl;
- }
- else {
- cout << "Elementot ne postoi" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment