#include "PlayerT.h" #include #include using namespace std; void PlayerT::Catch( void ){ count ++; } string PlayerT::GetName( void )const{ return name; } int PlayerT::GetCount( void ) const{ return count; } int PlayerT::GetMyPosition(void) const { vector::iterator pos = find(team.begin(), team.end(), this); int position; if (pos == team.end()) { throw logic_error("unknown player"); } else { position = static_cast (pos - team.begin()); } return position; }