I am having trouble creating 2d dynamic arrays -- right now the code just produces a seg. fault. I can't figure it out... any help will be appreciated.

CODE: http://pastebin.com/d6816f184