SO is not a school. It is most definitely a reference and as such, just like any other reference we need to make sure that the best answer is clearly obvious.
To do this, there is the voting mechanism. It allows for a democratic means to float the good answers to the top - those that would add a long term value to the site and others looking for the same question - and lowers those that are not the best approach.
Answers are only as good as questions - which is why there is voting on questions as well. Sometimes the best answer is not the one accepted by the person asking, and voting also helps others visiting the page to get an idea of what is the better response.
As such, when answering questions, make sure that:
- You first understand the question (use the comments section under the question to ask for clarifications).
- If the original poster is clearly going down the wrong path, then first attempt to fix the error in their approach (for example, edit the code snippet they posted to fix the issue), and then describe your better approach. This is useful to others because it explains why.
- Linking to references is okay, but don't put a just a link - this is because links can expire/rot, reducing your answer's merit. So, when referencing a link, copy the relevant parts to your answer.
The point of your answer should be that it stands up against time, it solves the problem, and it is the best approach (the community can decide on this by the voting mechanism).
This does not mean you have to write a book as an answer - in fact, a question that leads to long winded prose answer is a sign of a bad question.
goto
andtry..catch..
to escape from loops. (I have seen many examples, even in popular professional companies products.). Also user was not asking what to use; he wanted merely to learn the possible replacements in C++.