fork download
  1. #include <iostream>
  2. #include <map>
  3. #include <set>
  4. using namespace std;
  5.  
  6. struct shape {
  7.  
  8. int x;
  9. };
  10.  
  11. int main() {
  12. shape arr[6] = {{1},{2},{3},{4},{5},{6}}; // some shapes
  13. std::multimap<shape*,shape*> c;
  14. c.insert({&arr[0],&arr[1]});
  15. c.insert({&arr[0],&arr[1]});
  16. cout<< c.count(&arr[0]) << endl;
  17. return 0;
  18. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
2