fork(1) download
  1. #include <iostream>
  2. #include <map>
  3.  
  4. int main()
  5. {
  6. std::map<int, int> a;
  7.  
  8. std::cout << "Size BEFORE: " << a.size() << '\n';
  9.  
  10. int b = a[0];
  11.  
  12. std::cout << "Size AFTER: " << a.size() << '\n';
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
Size BEFORE: 0
Size AFTER: 1