From: Mark Phillips Newsgroups: comp.os.msdos.djgpp Subject: Re: Reading from a file... Date: Sat, 22 May 1999 14:09:24 -0500 Organization: The University of Manitoba Lines: 19 Message-ID: References: NNTP-Posting-Host: gold.cs.umanitoba.ca Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: canopus.cc.umanitoba.ca 927400175 10788 130.179.24.1 (22 May 1999 19:09:35 GMT) X-Complaints-To: Postmaster AT cc DOT umanitoba DOT ca NNTP-Posting-Date: 22 May 1999 19:09:35 GMT In-Reply-To: To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > I've got a data file and can read words and numbers from it (each piece > of data is on a separate line), and want to read a whole line of text -- > however, I can only get it to read up to the first space... > Any help will be greatly appreciated! if you're using the C++ ifstream class, try getline(). i don't remember if it's a member function: an_ifstream.getline(a_string); or just a regular function: getline(a_string, an_ifstream); one of those should work though. if not, open up iostream.h and search for getline and see how it should be done. mark.