🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.help
Article #865

possible bug with file input

#865
From: GNU Mailing List Maintenance
Date: Thu, 28 Dec 1995 19:30
19 lines
755 bytes
When using getline followed by a getc for an integer,
then another getline the last getline returns a blank string. 
Is this a bug or has it already been fixed.  

Sample code:
char lname[30], rname[30];
int one;
ifstream myfile;
// and open file
myfile.getline(lname, 30);
myfile >> one;
myfile.getline(rname, 30);
...


any help is appreciated.

Thanks
Dean
Technical Details
Message-ID: <gnusenet4b219e$77k@ionews.io.org>
Path: arc1-ca.pugleaf.net!prep.ai.mit.edu!gnu

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!prep.ai.mit.edu!gnu
From: gnu@prep.ai.mit.edu (GNU Mailing List Maintenance)
Newsgroups: gnu.g++.help,comp.lang.c++
Subject: possible bug with file input
Date: 28 Dec 1995 14:30:01 -0500
Organization: Internex Online, Toronto, Ontario, Canada (416 363 3783)
Sender: daemon@cis.ohio-state.edu
Distribution: world
Message-ID: <gnusenet4b219e$77k@ionews.io.org>