I try to use the getline function, it works in simple program and accepts the input from user but when i try to use inside the do while loop, it just escape the line and shows that there is null input. cin works fine,
case 1:
cl.append(Cb("abc",false));
cout << "text";
cout << "text1" << cl <<"&\n";
getline(cin,srch);
cl.append(Cb(srch,false));
cl.append(Cb("bbb",false));
cout << cl <<"&\n";
break;
here the cl is the instance of the object abc and Cb is the constructor defined in namespace, it accepts the first and third append but it does not take the srch variable which is of string type and display null through cl which is the operator overloaded one.