I think flushing buffer (fflush(stdin), if using stdin as your stream) will solve your problem, but flush will work in case of stdin but it will not give desired output for file stream
Thanks Vishal On 13 Mar 2007 16:56:48 -0700, Eyyo.Net Web Hosting and Design < [EMAIL PROTECTED]> wrote: > > Hi Everybody > > I am getting a trouble with getline function. What is that? Let me explain > little. I coded an inventory program which is my first C++ program and I am > using DEV C++ 4.9.2.2 something. Ok. > > I already attached my inventory program codes in this email. Try to use > getline instead of any cin function. If you look into my source code go to > NewRecord function then try to chance new Item Name entry section you will > see that > > cout << "Enter item's name (max 15) :"; > cin >> NewRecord.ItemName; > > and when I change it to > > getline (cin, NewRecord.ItemName); > > then it will pass automatically it means I can not input any data into the > value. > > Please I am really in trouble and before sending this email here i looked > for on the net but got nothing. > > Note: I am a newbie. > > Thanks > Bilgehan > > [Non-text portions of this message have been removed] > > > -- Regards Vishal Thakur +919871892410 [Non-text portions of this message have been removed]
