c++ cin question
From: Starkiller (starkiller_at_starkiller.org)
Date: 02/05/04
- Next message: Gary: "Re: [C] simple string question"
- Previous message: Ben Measures: "Re: Input string vs. char array"
- Next in thread: Russell Hanneken: "Re: c++ cin question"
- Reply: Russell Hanneken: "Re: c++ cin question"
- Reply: Chris \( Val \): "Re: c++ cin question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 4 Feb 2004 22:51:00 -0600
Ok, I know that
std::cin.ignore(someint, '\n');
will ignore all the rest of the stream upto <=someint chars, or '\n' or
which ever comes first.
My question is is there a way to instruct cin to ignore everything currently
in the stream no matter how many chars it is? I mean completly reset the
stream. I thought std::cin.clear(); was my awnser but no luck there it keeps
the current stream if there isnt an error state.
thanks
- Next message: Gary: "Re: [C] simple string question"
- Previous message: Ben Measures: "Re: Input string vs. char array"
- Next in thread: Russell Hanneken: "Re: c++ cin question"
- Reply: Russell Hanneken: "Re: c++ cin question"
- Reply: Chris \( Val \): "Re: c++ cin question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|