Why does the map size returns 0
<pre><code>  using namespace std;

  class A {
      public:
         A() {}
         ~A() {}

         map&lt;int, string*&gt;&amp; getMap() {
             return mapStr;
         }

         void setMap(const map&lt;int,string*&gt; m) {
             mapStr = m;
         }

      private:
          map &lt;int, string*&gt; mapStr;
  };


  class B {

      public:
      A getA() {
          return a;
      }
      private:
      A a;

  };

  int main(int argc, char*argv[]) {

      map&lt;int, string*&gt; mm;
      mm.insert(std::make_pair(1, new string("abc")));
      mm.insert(std::make_pair(2, new string("def")));

      B b;
      b.getA().setMap(mm);
      cout &lt;&lt; "Size " &lt;&lt; b.getA().getMap().size() &lt;&lt; std::endl;
      return 0;
  }
</code></pre>

<p>Output:
      Size 0</p>

<p>Any ideas as to why does this return the map size to be 0 and what needs to be done to be fixed</p>
