Question: Which is better approach and why.

Answer: 
Something else I personally think is important is setting focus to whichever button is the equivalent to cancel. I think a lot of users get accustomed to these kind of prompts and just hit enter without even reading what is on the dialog. When they do this I think in most situations it's better to play it safe and cancel than to commit something.
I hate being asked if I want to save, personally. If I needed to I probably did. If I've forgotten then most programs I use have an auto-save feature.

The idea about seeking out UI guidelines is good, but I agree with the person who suggested minimal user intervention. His analogy about writing on paper hit the nail on the head. Many programs come with some sort of version control these days.