我有双端队列并想向后迭代。我还需要索引(否则我会使用 reverse_iterator)所以我尝试了:
if ( _children.size( ) > 0 ) // debugging purpose
{
unsigned si( _children.size( ) ); // debugging purpose
int s( _children.size( ) - 1 ); // debugging purpose
for ( unsigned c ( 0 ) ; c < _children.size( ) ; ++c )
if ( this->_children[ ( _children.size( ) - 1 ) - c ]->Topmost( ) &&
this->_children[ ( _children.size( ) - 1 ) - c ]->BorderRectangle( ).IsIn( X , Y ) )
return std::pair< int, WindowPointer >( ( _children.size( ) - 1 ) - c, this->_children[ ( _children.size( ) - 1 ) - c ]->WindowAt( x, y ) );
但我得到一个 sigsev。调试后我得到那个索引是-65。我检查了 _children.size()
unsigned si = _children.size( );
它是 4294967232。和
long s = _children.size( ) - 1;
是-65。我如何获得这样的价值观?以及如何解决这个问题?