This particular question was asked by me with honest curiosity and earnest effort was put in forming it as well. Never mind how easy/difficult the solution turns out to be, it was a legitimate problem that I was facing.
Also there were no qualms about the effort put forth in forming the question and providing necessary relevant details. However, when the question was posted in the SO chat room, numerous people blasted if off, gleefully if I might add. Barring a small minority (the accepted answer was a well-explained solution), everyone ganged up against the question with their negative votes.
No matter where the OP is coming from, earnest effort put forth and genuine problems he/she faces should be recognized independent of his/her coding competence.
I hope to find some justice here (at meta) regarding this matter.
Here is the link to question: Detecting end of input using std::getline.
Here is the link to chat transcript: https://chat.stackoverflow.com/transcript/10?m=12674757#12674757
I was very polite in introducing the question to the chatroom. I started off by posting the link and saying "I think it is an interesting question". I never spammed or commented out of my chance. Nor did I once point my finger at anyone or make personal insults.
I thank everyone here very much for having shown solidarity. I understand the nature of SO chatrooms and the innate hostility involved, and that is exactly the issue I wanted to throw light on in the first place; on how that hostility doesn't remain inside the chatrooms, but spills out to the main site as well.
I admit I could have been more clear in my introduction of the question in the chatroom. I could have said that this is a problem that I am facing. But that was in no way to pretend to be not the asker. Anyone who would see the asker profile would know in any case that the OP was me.