By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,299 Members | 1,397 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,299 IT Pros & Developers. It's quick & easy.

The difference of uflow and underflow functions ?

P: n/a
Sory about stupid question.

What are differences between uflow and underflow functions ?
Pls explains.
Tks
Jul 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
> Sory about stupid question.

It would have been a good question if you told us the class of these
(member) functions. I assume you are talking about the members of
std::basic_streambuf and derived classes.
What are differences between uflow and underflow functions ?
Pls explains.


This is what the standard has to say about it:

int_type uflow();

Requires: The constraints are the same as for underflow(), except that
the result character is trans-ferred
from the pending sequence to the backup sequence, and the pending
sequence may not be empty
before the transfer.

Default behavior: Calls underflow(). If underflow() returns
traits::eof(), returns
traits::eof(). Otherwise, returns the value of
traits::to_int_type(*gptr()) and
increment the value of the next pointer for the input sequence.

Returns: traits::eof() to indicate failure.
--
Peter van Merkerk
peter.van.merkerk(at)dse.nl

Jul 22 '05 #2

P: n/a
Hi,

underflow attempts to return the current element from the input stream, but
does not advance the the input stream position. While uflow attempts to
return the current element and advances the stream position if successfull.
uflow is typically implemented by calling underflow and if underflow does
not return traits_type::eof it adjusts the stream position.

Hope this helps

Chris Taylor
<dx****@yahoo.com> wrote in message
news:bp*************@ID-134679.news.uni-berlin.de...
Sory about stupid question.

What are differences between uflow and underflow functions ?
Pls explains.
Tks



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.