成员返回的值,因此,如果有)。
const Type* operator->( ) const;
返回值
成员的值,因此,如果有)。
备注
我 (> 等效于 (*i) .m
运算符将返回 &**this。
示例
// istream_iterator_operator_vm.cpp
// compile with: /EHsc
#include <iterator>
#include <iostream>
#include <complex>
using namespace std;
int main( )
{
cout << "Enter complex numbers separated by spaces & then\n"
<< " a character pair ( try example: '(1,2) (3,4) (a,b)' ): ";
// istream_iterator from stream cin
istream_iterator< complex<double> > intRead ( cin );
// End-of-stream iterator
istream_iterator<complex<double> > EOFintRead;
while ( intRead != EOFintRead )
{
cout << "Reading the real part: " << intRead ->real( ) << endl;
cout << "Reading the imaginary part: " << intRead ->imag( ) << endl;
++intRead;
}
cout << endl;
}
(1,2) ()、(3,4,值 b
FakePre-9d30671ce6884f96a0dfd0bdd60ac711-871caf5283d44fd69a14a8d020fad7e1
要求
头文件: <iterator>
命名空间: std