Hello everyone I am working on a exercise for a class of mine. I have been looking at this for too long I need a fresh set of eyes. In my dynamic_template_array class the addEntry() function works fine if I add pass one entry to it. If I send more that one entry to it in a loop it does nothing wont print out anything. I have tried a multitude of things well you'll see.If someone could just let me know where I went wrong I would really appreciate it. Thanks.
Just in case this turns up in a search and someone has a similar problem, the biggest issue was the use of sizeof on line 81. sizeof(pointer_type) yields the size of a pointer, and not size of the memory it points to.
Aside from that, one should never use memcpy in template code which is not restricted to trivial types. Instead, prefer std::copy: