7 template<class K, class V>
15 template<class K, class V>
17 Array< Assoc_ent_<K,V> > arr;
21 int find(K key) const {
22 for (int i = 0; i < arr.size(); i++) {
23 if (!arr[i].free && key == arr[i].key)
28 int find_creat(K key) {
30 for (int i = 0; i < arr.size(); i++) {
31 if (key == arr[i].key) {
33 } else if (arr[i].free ) {
38 arr[free].free = false;
50 bool elt_query(K key) const {
51 return find(key) >= 0;
54 assert(elt_query(key));
60 int i = find_creat(key);
64 should create "set" template
66 V& operator[](K key) {
67 return arr[find_creat(key)].val;
69 const V& operator[](K key) const {
70 assert(elt_query(key));
71 return arr[find(key)].val;
74 /** mindblowingly stupid Associative array implementation