hey guys. really sorry. i'm due for an assignment on multisets. can anyone help me spare an example. no specifics required. just a set on objects like (eggs. shampoo. shopping stuff you know..) and a counter. the stuff on the websites didnt help me much. and i'm down to one weak example programme below. pls help! much appreciated
#include<iostream>
#include<set>
using namespace std;
int main() {
multiset<long> A;
for (int k=1; k<=5; k++) A.insert(k);
A.insert(3);
cout <<"The size of A is " << A.size() << endl;
multiset<long>::iterator ai;
cout << "The elements of A are: ";
for (ai = A.begin(); ai != A.end(); ai++) {
cout << *ai << " ";
}
cout << endl;
return 0;
}