I was using getline() function and it was getting skipped. I searched through the forum and found the tutorial on how to flush the input stream but there is one thing that is still unclear to me :
getline() uses newline character as a delimiter. So when a '\n' is found at the end in input stream getline() is skipped. As stated in the tutorial, formatted stream leaves a newline character in the stream and the mixed/non-formatted one consumes it. So shouldn't
getline be skipped in formatted stream rather than in non-formatted one??
P.S : I would've posted in the same tutorial but i think it was locked, so please bear with me for starting a new thread.