What happens is that the array passed on by otherstuff does get copied over in LoadArray but somestuff doesent, both the array pointers make it to LoadArray function and are within its contents identical but memcpy works on one but doesent on the other (with the only difference between the 2 being that one was created in a function). Super confused here, what gives?
EDIT: i think the array created within the function gets destroyed after the function finishes so i copied the contents over to a pointer that allocated some memory with new and returned that pointer instead, works now.