Primitive ArrayList Implementation
pointer = (T*)calloc(len, sizeof(T));


Say what?  I’m used to getting people to stop using “naked new”, but this is C memory management!  Why would you do that?  You are not initialing any of the T objects you allocated room for.  That may work for ints and other primitive types, but in general you are looking at a boom when you subsequently access an element.

unsigned short


Why use this for the size type?  At the very least, abstract it as a member type, normally called size_type.  The usual default type for this is std::size_t but there is a movement to switch to signed types for new containers.

   if (index &gt; length) throw;


Throw what?  This will crash since throw by itself is only allowed when there is a current exception being handled.

Your insert and remove take (signed) shorts, which conflicts with your use of unsigned for indexes.  Besides not being able to represent all the values, you will have problems comparing them, which is exactly what you do in the first line.

To provide for the negative number indexing feature, either use the same approach as Eric Neibler (end - 5 rather than -5) or use the signed type for your length, as suggested earlier.



Your insert is re-allocating memory, which is not what I’m expecting.  You are implementing a vector class, not an array class (which is fixed length).  So why?  What’s wrong with std::vector?



LinearSearch, BinarySearch:  Don’t write these members.  Instead, allow std::find etc. (as well as all other algorithms) to work with your container.



You re-allocate upon inserting, but not when deleting.  But you don’t keep track of how much slack space you have.