예제 #1
0
double tower_height(const Tower& t){
  Tower::const_iterator it;
  double res = 0;
  for(it=t.begin(); it!=t.end(); it++){
    res += it->height();
  }    
  return res;
}
예제 #2
0
void show_tower(const Tower& t){
  Tower::const_iterator it;
  for(it=t.begin(); it!=t.end(); it++){
    it->show();
  }
}  
예제 #3
0
bool can_stack(const Box& b, const Tower& t){
  return b.compare(*(t.begin())) == '>';
}