I think you don't know it prog-bman
Prototype of getline is as under
Code:
getline& getline(char*,int,char='\n')
So,if you don't provide third argument by default it will take it as newline character
Below code proves my point
Code:
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
char a[100];
cin.getline(a,100,'$');
cout<<a;
getch();
return(0);
}
A sample run of above code
Code:
hello
how
are
you $ I
hello
how
are
you
Here '$' is treated as terminating character and if you will cout the var you will find that char I is not accepted.