I've isolated my code and I've found this is where the problem is coming from - my clear function. I'm currently making a 2D array. I've made a function that allocates memory for the 2D array, however, my function to deallocate the memory isn't working.
1 2 3 4 5 6 7 8 9
void Puzzle::clear(){
m_table = deletechar*[m_size];
for(int i = 0; i < m_size; i++){
m_table[i] = deletechar[m_size];
}
}
I keep tweaking it but I'm not 100% sure what's wrong. I'd appreciate any help, thank you!