Added explanation and code snippets for both cin.good and breaking on ctrl-d