Suspicious - looks like an unitiated value, having use'd strict in perl since the second week, I thought for a moment and looked at the code.. oh dear.. while refactoring I had removed the code using point, but not its declaration, so while I looped through 1 to 4 using point rather than i, the poor code was being asked to look at element $BIG_NEGATIVE_NUM deep inside a dynamic array.
Even using strict wouldn't have caught that, in C and C++ I must remember to initialise all values to 0 when declaring them unless I want to pass around random junk when I use the wrong variable, easier to trace that than segfaults.
Anyway, just before getting off the train I managed to run a test program using the class and killed my machine twice in a row because the code went into a fast infinate loop. I managed to fix that but there are still subtle bugs in the code so that it doesn't quite work for squares larger than 2 x 2. The new code can be found here.
Hopefully on my next train journey I can fix that and add some output via GD.
I would be very grateful if anybody can point me at the equivilent of Test::Simple or Test::More for C++.