Hi locus.
Dank dir, es funktioniert nun super...
genau so wollte ich das haben.
Fuer alle, die interessiert sind wie es nun aussieht:
Code:
std::pair< int, bool >
CardTypeList::add( const std::string& type )
{
std::vector< std::string >::iterator found;
found = find( m_typelist.begin(), m_typelist.end(), type );
if ( found != m_typelist.end() ) {
int index = m_typelist.begin() - found;
return std::make_pair( index, false );
}
m_typelist.push_back( type );
return std::make_pair( m_typelist.size(), true );
}
Gruß
Kai
Lesezeichen