You allocated space for a 30x30 array, but you're trying to access map[30], which is out of bounds.
Valid indices would be 0 through 29 in both dimensions.
Also, once (if) dx goes to 30, you are also going out of bounds of the inner array.
As an aside, if you're going to learn OpenGL, I should strongly suggest learning modern OpenGL. The stuff like glPush, glPop, glBegin, glEnd ("immediate mode" stuff) is deprecated.
This is a good site to learn modern OpenGL: http://www.opengl-tutorial.org/
___________________________________
Bigger picture: What is it you want in Map once it's completely loaded? What file is being loaded? Is the map a hardcoded 4x6 map, or do you want it to be a 30x30 map?
Here's an example of a way one might load a basic rectangular map into memory: