Reason Report
1. In the class Category:
vector<Category*> sub_categories;
changed into
set<Category*> sub_categories;
The reason: The STL set container stores unique items in an ordered collection, the vector<Category*> stores pointers to the sub-categories of each category. so it can be changed.
2. In the class Category:
vector<int> items;
changed into
set<int> items;
The reason: The STL set container stores unique items in an ordered collection and the vector<int> stores the unique id entification numbers of the advertisements that belong to this category. so it can be changed.
3. In the class Group:
vector<Client*> container;
changed into
map<string,Client*> container;
The reason: The STL map container is an associative structure that stores data in key-value pairs. Because each client has the only eamil as the key string, so it can be changed into STL map.
4. In the class Client:
vector<int> offerings;
vector<int> bids;
changed into
set<int> offerings;
set<int> bids;
The reason: The STL set container stores unique items in an ordered collection,and the unique integer numbers of the advertisements bid on and the advertisements posted are stored in the private vectors bids and offerings. So they can be changed.