Whenever I have to resort to a hammer to get a crank with damaged threads off a bike, I use a trick a veteran mechanic showed me a long time ago. First (and most important), clamp the bike by the seatpost in the repair stand as loosely as possible (if you don't have a repair stand, use a shock cord or an inner tube to dangle the bike from a pipe in the basement or whatever). It's crucial that none of the hammer impact is absorbed by whatever's holding the bike up off the floor.
Next, find something you can use as a drift pin so that you can hammer on the crank spindle (that's right, you're hammering on the spindle the crank is stuck on instead of on the crank). A long, large-diameter bolt from a hardware store works fine (the bigger the bolt diameter the better, as long as the bolt is a little smaller in cross-section than the spindle end).
Finally, grab the bolt, place the bolt end against the spindle end inside the stuck crank, and smack the other end of the bolt with the biggest hammer you can find. If you hit hard and accurately enough, the crank pops right off the spindle.
I don't know why this works, but it does. Tip: hold the bolt in a pair of vice grips (you're going to be swinging the hammer as hard as you can and you don't want to mash every bone in your hand) and take a few practice swings with the hammer before you give it all you've got.