Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <map>#include <string>#include <vector>#include <iostream>using namespace std;enum Currency {RUB, DOLLAR, EURO};struct Deposit{ int sum; Currency val; string date;};struct Person{ string name; string passport; Person(string name_, string passport_) { name = name_; passport = passport_; }};bool operator < (const Person &first, const Person& other){ if (first.name == other.name) return first.passport < other.passport; return first.name < other.name;}void main(){ freopen("base.txt", "r", stdin); vector<vector<Deposit>> v; std::map<Person, int> map; Person p("Trololo", "1234 567890"); map[p] = 3;}
Add Comment
Please, Sign In to add comment