If you think you can add a constructive comment in addition to flagging, then please do! These sorts of comments are important because they teach new users about the rules of the site, and they will be visible to the post's author even after the post has been deleted.
Ideally these sorts of comments would be added as part of the community review process in the Low Quality Posts Queue, where reviewers can add a few different boilerplate comments. In the case you're describing (somebody has left a comment as an answer), there are a few relevant boilerplate comments:
Ask another question
This does not really answer the question. If you have a different question, you can ask it
by clicking [Ask Question](https://stackoverflow.com/questions/ask). You can also [add a
bounty](https://stackoverflow.com/help/privileges/set-bounties) to draw more attention to
this question once you have enough
[reputation](https://stackoverflow.com/help/whats-reputation).
Preview:
This does not really answer the question. If you have a different
question, you can ask it by clicking Ask
Question. You can also add a
bounty to draw
more attention to this question once you have enough
reputation.
"Comment" answer
This does not provide an answer to the question. To critique or request clarification from
an author, leave a comment below their post - you can always comment on your own posts,
and once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation)
you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment).
Preview:
This does not provide an answer to the question. To critique or
request clarification from an author, leave a comment below their post
- you can always comment on your own posts, and once you have sufficient
reputation you will
be able to comment on any
post.
"Thank you" answer
Please don't add "thank you" as an answer. Once you have sufficient
[reputation](https://stackoverflow.com/help/whats-reputation), you will be able to [vote up
questions and answers](https://stackoverflow.com/help/privileges/vote-up) that you found
helpful.
Preview:
Please don't add "thank you" as an answer. Once you have sufficient
reputation, you will
be able to vote up questions and
answers that you
found helpful.
I have a slight variety that I use for "me too" posts:
"Me too" answer
Please don't leave answers stating that you have the same problem as the one described in the
question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation)
you will be able to upvote questions that are helpful or [add a bounty](https://stackoverflow.com/help/privileges/set-bounties)
to draw more attention to a question.
Preview:
Please don't leave answers stating that you have the same problem as
the one described in the question. Once you have sufficient
reputation you will
be able to upvote questions that are helpful or add a
bounty to draw
more attention to a question.
While ideally these sorts of comments would be added through that queue, in practice many posts with NAA flags end up in the moderator flag queue not having been deleted and not having had a boilerplate comment added; in the past week I've added more than 200 boilerplate comments when handling NAA flags. If you think you can add constructive comments in addition to flagging then please do -- you're helping to teach a new user how to use the site and you're decreasing moderator workload.