Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <map>
- using namespace std;
- int main() {
- map<string, int> oceni;
- oceni["Josif"] = 3;
- oceni["Kiril"] = 4;
- oceni["Petar"] = 5;
- for(pair<string, int> p: oceni) {
- cout << p.first << " " << p.second << endl;
- }
- for(map<string, int>::iterator it = oceni.begin(); it != oceni.end(); it++) {
- cout << it->first << " " << it->second << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment