Let's be perfectly honest, hitting the crank with a hammer is simply a hamfisted way of getting a pedal off, certainly it might 'work' but it really isn't the best practice and you run the risk of stripping the flats and/or damaging/stressing parts unnecessarily.
It worked for Bonj in this one instance which is OK, it's his bike and his choice at the end of the day but I would seriously cry shy of suggesting this is the 'correct' way to remove pedal axles and just 'a job done' with the only tools to hand.
Suffice to say my advice falls into the oil soak, heat and scaffold pipe leverage school of thinking. Another option, if you can't get hold of a piece of scaffolding pipe, is to use a fork tube from an old motorbike.