This question already has an answer here:
- What is the XY problem? 3 answers
- Ethics for SQL insert queries vulnerable to SQL injection [closed] 5 answers
- Answering beyond the question's scope 3 answers
Let us assume that someone posted a question about allocating a 2D array in C++, his code doesn't compile because he has errors in it.
Now after you read the question, you see that he should use
std::vector becuase it's better and more recommended in his case. But he's asking about arrays and not
Now let's say someone posts an answer that solves his problem (with an explanation), but
std::vector is not mentioned in the answer (as OP wasn't asking about
Should this answer be downvoted because it doesn't suggest a better solution? Or it's fine because it solves OP answer?