I think you don't know it prog-bman
Prototype of getline is as under
So,if you don't provide third argument by default it will take it as newline character
Below code proves my point
A sample run of above code
using namespace std;
Here '$' is treated as terminating character and if you will cout the var you will find that char I is not accepted.
you $ I