M
m_schellens
How can I get from a vector index the iterator?
typedef std::vector< doubleT> doubleV;
doubleV xV;
doubleV yV;
// fill xV and yV with values (they have the same size)
....
for( SizeT i=0; i<yV->size(); ++i)
{
if( (*yV)[ i] <= 0.0)
{
yV->erase( ***what? ***); // want to erase yV
xV->erase( ***what? ***); // want to earse xV
}
}
I know I could iterate through an iterator.
But to much typing for xV then.
Thanks,
Marc
typedef std::vector< doubleT> doubleV;
doubleV xV;
doubleV yV;
// fill xV and yV with values (they have the same size)
....
for( SizeT i=0; i<yV->size(); ++i)
{
if( (*yV)[ i] <= 0.0)
{
yV->erase( ***what? ***); // want to erase yV
xV->erase( ***what? ***); // want to earse xV
}
}
I know I could iterate through an iterator.
But to much typing for xV then.
Thanks,
Marc