Original Post
My problem resides in using both getch() (from conio.h) and cin.getline (from iostream) in a console based program.
If i call getch, my next call to getline will "include" the char typed in the call to getch.....ie:
#include
#include
using namespace std;
void main()
{
char choice;
char *tmp_str;
choice = getch();
cout << "Enter name : ";
cin.seekg(1);
cin.getline(tmp_str,80,''\n'');
}
Let''s say i enter ''a'' for my call to getch() , the cout will display :
Enter name : a
How can i clear the cin''s "buffer" or stream or whatever??
Thanks in advance....