4) Why are you using pointers and new ?????

I used new because when I encountered a bug, somebody suggested that I need to initialize the pointers. So, I thought I could use new to retrieve the memory location. As for why I use pointers to type DoubleArray, it is because I have to integrate my code to an existing program written by others. They often use DoubleArray *ptr in the code.