I'm a bit lost as to why my program is getting an error code as it runs. It will compile I get an error memory violation code. The goal is to let the user enter an odd number greater than 3 and print out a magic square of those dimensions. Any help or guidance? I need to use the dynamic array.
`p1' should always be less than userChoice or else you'll have out of bound access.
But after line gets 36 executed, you increment `p1' in line 45 and break that.
Not sure what was your intention there.
you also let the index become negative
line 51 is trying to access out of bounds (you are printing the same cell over and over again)