Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Re: streams

Reply
Thread Tools

Re: streams

 
 
John Harrison
Guest
Posts: n/a
 
      08-04-2003

"Anthony Moss" <> wrote in message
news:3f2e97e9$...
> I have overloaded the std::istream operator >>, and am reading information
> from a file.
> however the files have comments in them
> Does any one know the stream operator which igrnores the rest of the line
> and progresses straight down to the beginning of the next line
> thanks
> Anthony
>


Not an operator but a method

file.ignore(INT_MAX, '\n');

Ignores characters upto and including the next newline. INT_MAX is defined
in <limits.h>

john



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Giving file names to response streams, possible? Paul L ASP .Net 2 04-11-2005 09:24 PM
streams and querystrings =?Utf-8?B?Sm9obiBIb3BwZXI=?= ASP .Net 2 01-21-2005 09:35 PM
how to use open with many input streams and capture output? Pawel Banys Perl 1 07-08-2004 06:32 PM
**Bug**: Handling Streams from within ashx handlers Detlef Hüttenbach ASP .Net 1 01-25-2004 11:39 AM
Audio Streams from ASP.NET Justin Weinberg ASP .Net 0 10-14-2003 05:59 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57