Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!think.com!linus!linus!gateway.mitre.org!ads From: ads@gateway.mitre.org (Alexas D. Skucas) Newsgroups: comp.lang.c++ Subject: Input Streams Message-ID: <1991Mar7.211045.16370@linus.mitre.org> Date: 7 Mar 91 21:10:45 GMT Sender: news@linus.mitre.org (News Service) Reply-To: ads@gateway.mitre.org (Alexas D. Skucas) Organization: The Mitre Corporation Lines: 17 Nntp-Posting-Host: gateway.mitre.org I'm a bit confused about how to skip to the next line when using input streams in C++. For example, if I am reading from a file that has ten entries on a line and decided to skip to the next line after reading only two of the entries, how do I do it? Currently I use cin.get(buf,1000) which puts everything into buf (up to 1000 characters) until it hits a new line character. Is there a more elegant way to do this? I don't like having to use a buffer since that eats up memory space. Thanks for any advice Alex ads@gateway.mitre.org