I am try to solve some problems in my program and it would appear that there is either a problem with my copy constructor or with my destructor. I am getting a memory exception.
You can't just memcpy
random objects, you need to actually copy them with their copy operators.
string
most likely holds a pointer to heap-allocated storage. If you copy it bitwise, calling the destructor on the original string invalidates the "copied" string's data.
Use something like std::copy
to do this properly.
#include
...
std::copy(a.readArray, a.readArray+arraysize, readArray);