std::istreambuf_iterator::operator*, operator-> - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::istreambuf_iterator::operator*, operator->

From cppreference.com
< cpp‎ | iterator‎ | istreambuf iterator

CharT operator*() const; | (1) |
CharT* operator->() const; | (2) | (since C++11)

Reads a single character.

1) Returns the result of sbuf_->sgetc() where sbuf_ is the stored stream buffer.
2) Returns a pointer to the result of `operator*()`.

The behavior is undefined if the iterator is end-of-stream iterator.

### [edit] Parameters

(none)

### [edit] Return value

1) The value of the obtained character.
2) A pointer to the obtained character.

### [edit] Exceptions

(none)

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/iterator/istreambuf_iterator/operator*&oldid=70123"