Extractors that provide formatted arithmetic input operations. Each signature extracts the specified type and stores it in n.
basic_istream<charT, traits>& operator >>(bool & n); basic_istream<charT, traits>& operator >>(short &n); basic_istream<charT, traits>& operator >>(unsigned short & n); basic_istream<charT, traits>& operator >>(int & n); basic_istream<charT, traits>& operator >>(unsigned int &n); basic_istream<charT, traits>& operator >>(long & n); basic_istream<charT, traits>& operator >>(unsigned long & n); basic_istream<charT, traits>& operator >>(float & f); basic_istream<charT, traits>& operator >>(double& f); basic_istream<charT, traits>& operator >>long double& f);
The Arithmetic extractors extract a specific type from the input stream and store it in the address provided.
| state | stdio equivalent |
|---|---|
| (flags() & basefield) == oct | %o |
| (flags() & basefield) == hex | %x |
| (flags() & basefield) != 0 | %x |
| (flags() & basefield) == 0 | %i |
| Otherwise | |
| signed integral type | %d |
| unsigned integral type | %u |