title: how to remove an item from a std::list
body: <p>My code:</p>
  
  <pre><code>using namespace std;
  
  class A{public: 
    int a; 
    A(int itemA) {a=itemA;}
  };
  class B:A{public:
    int b; 
    B(int itemA, int itemB) {a=itemA; b=itemB;}
  };
  
  class C{
    list&lt;A&gt; a;
    list&lt;B&gt; b;
    void transferAB(const A&amp; pA, int itemb){
      a.remove(pA);
      b.push_back(B(pA.a, itemb));
    }
  </code></pre>
  
  <p>How do I make this thing work?</p>