So this question stems from the fact that once a question is accepted as a duplicated by the OP you can't post any more answers to it and we are trusting the OP with that potentially impactful (to new answer writers) action.
In the case of your most recent example it was two knowledgeable users plus the author that determined it was a duplicate. The two users who voted to close the question, combined have nearly 500 answers, to questions with the C and C++ tag.
How comes some random user can single handedly accept a question to be a duplicate from a single vote - is he knowledgeable enough - what about the hard work of other writers?
The random user you speak of was the actual author of the question. Had this user not agreed with both of those other users, the close vote would have stood, until additional users voted to close the question.
I suggest to disable this feature and only mark as duplicate when enough votes from credible users are risen.
If we allow an author of a question to accept an answer, even if it's a bad answer, we should also accept when they agree it's a duplicate of an existing question.
Or I mean if the user with high enough rep with the tag decides to close it (as its right now). I'm talking about the original poster whom should be forbidden from taking that action all by himself.
I strongly disagree with this suggestion. The author of the question is the next best individual to determine, if an answer to another question, addresses their question. In this case not only did multiple community users agree it was a duplicate but the author also agreed.
a single flag.... from the person who ASKED THE QUESTION. I mean.... "did this solve your issue".
Except a single flag, wouldn't actually close a question, unless you are talking about a user with a gold badge in a tag.