10 template<class K, class V>
18 /** mindblowingly stupid Associative array implementation.
21 template<class K, class V>
23 Array< Assoc_ent_<K,V> > arr;
27 int find(K key) const {
28 for (int i = 0; i < arr.size(); i++) {
29 if (!arr[i].free && key == arr[i].key)
34 int find_creat(K key) {
36 for (int i = 0; i < arr.size(); i++) {
37 if (key == arr[i].key) {
39 } else if (arr[i].free ) {
44 arr[free].free = false;
56 bool elt_b(K key) const {
57 return find(key) >= 0;
66 int i = find_creat(key);
70 return arr[find_creat(key)].val;
72 V& operator[](K key) {
75 V const & operator[](K key) const {
78 V const & elem(K key) const {
80 return arr[find(key)].val;