A friend asked me to edit this for him, and quite frankly, I have no idea how to do it. He wants me to make the function add new data to the top of the array, rather than the bottom, and can be sorted highest to lowest. So, here's the code for the function:
Code:void ptrlist::add(char* item) { if ((length * 4) == buffSize) { char** temp = new char*[buffSize + 6]; if (temp == 0) return; buffSize += 6; memcpy(temp, buff, length * 4); delete[] buff; buff = temp; } buff[length] = item; length++; }