#include #include #include #include #include #include using namespace std; int main() { vector v(10); cout << v.size() << endl; for (int i = 0; i < 10; i++) v.push_back(i); cout << v.size() << endl; cout << v.capacity() << endl; v.resize(100); cout << v.size() << endl; cout << v.capacity() << endl; for (unsigned i = 0; i < v.size(); i++) cout << v[i] << endl; for (vector::iterator i = v.begin(); i != v.end(); i++) cout << *i << endl; list l; l.push_back(10); l.push_front(1); for (auto i = l.begin(); i != l.end(); i++) cout << *i << endl; cout << l.size() << endl; set s; cout << s.size() << endl; s.insert(10); s.insert(1); s.insert(10); s.insert(5); cout << s.size() << endl; if (s.count(1)) cout << "Ima ga u skupu" << endl; else cout << "Nema ga u skupu" << endl; for (auto i = s.begin(); i != s.end(); i++) cout << *i << endl; string s1 = "mirko"; cout << s1 << endl; cout << s1.size() << endl; cout << s1[0] << endl; s1[1] = 'a'; cout << s1 + s1 << endl; map ocene; cout << ocene.size() << endl; ocene["ana"] = 9; cout << ocene.size() << endl; ocene["ana"] = 10; cout << ocene.size() << endl; ocene["marko"] = 8; ocene["branko"] = 7; for (auto i = ocene.begin(); i != ocene.end(); i++) cout << i->first << " - " << i->second << endl; map::iterator tmp = ocene.find("branko"); if (tmp != ocene.end()) cout << tmp->second << endl; else cout << "Nema njegove ocene" << endl; cout << ocene["mirko"] << endl; cout << ocene.size() << endl; return 0; }