edits
[iotcloud.git] / version2 / src / C / vector.h
index ccd86498cc635f9943aa6d3ae5a185bbb6488850..1d468a7fc835e723f403fe73d91ec9f841e0be3b 100644 (file)
@@ -42,6 +42,13 @@ public:
                }
        }
        
                }
        }
        
+       void removeIndex(uint i) {
+               for (i++; i<fldsize; i++) {
+                       array[i - 1] = array[i];
+               }
+               fldsize--;
+       }
+       
        type last() const {
                return array[fldsize - 1];
        }
        type last() const {
                return array[fldsize - 1];
        }
@@ -73,6 +80,14 @@ public:
                array[fldsize++] = item;
        }
 
                array[fldsize++] = item;
        }
 
+       type lastElement() {
+               return get(size()-1);
+       }
+
+       type firstElement() {
+               return get(0);
+       }
+
        type get(uint index) const {
                return array[index];
        }
        type get(uint index) const {
                return array[index];
        }