2

Today my answer was converted into a comment I do not know the reason why our moderator has changed my answer to the comment. The link to my answer is here. I still do not understand why it was deleted and merged with comments any light to it would be grateful so that if it's a mistake then I don't repeat it.

Thanks and Regards,

Maaz

2 Answers 2

3

That question was about compilation error which was solved by answer recommending to use .c_str().

The update turned the question into a troubleshooting case, which is not possible on a Q&A site. Sometimes we help troubleshot but not in answers but in comments. Your 'answer' is such a comment. If it takes many comments, then the session is moved to chat, which is more suitable because it can show source code.

If OP answers your comment, I will move the comments session to chat and you can do the troubleshooting there. But the question was asked 1 year, 4 months ago so I doubt OP still tries to solve this.

Note: strdup allocates string on heap

1
  • Yeah, later I checked when the question was asked. Thank you for the clarification
    – Maaz Sk
    Aug 22, 2021 at 11:03
6

Simply because an answer asking the OP to try something is not an answer - it is one of a stream of comments.

If you want clarification or for the OP to try something out and get back to you then you ask that in comments. Once the cause and solution has been "nailed" in the comments you can flesh that out into a proper answer.

3
  • 1
    Can you please let me know the full form of OP also. Thank you
    – Maaz Sk
    Aug 22, 2021 at 11:05
  • 2
    @MaazSk Original Poster. The person asking the question.
    – Majenko Mod
    Aug 22, 2021 at 11:07
  • 1
    Okay, Thank you!
    – Maaz Sk
    Aug 22, 2021 at 11:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .