title: What does .* operator do in C++?
body: <p>What does a.*b operator do in c++? i have found this reference:
  "Object pointed to by member b of object a", but it doesn't work in the following example:</p>
  
  <pre><code>class Color {
      public:
      int red,green,blue;
  
      Color():red(255), green(255), blue(255){}
      Color(int red, int green, int blue) :red(red), green(green), blue(blue){}
  
      void printColor(){
          cout &lt;&lt; "Red:" &lt;&lt; red &lt;&lt; "  Green:" &lt;&lt; green &lt;&lt; "  Blue:" &lt;&lt; blue &lt;&lt; endl;
  
      }
  };
  
  class Chair{
  
      public:
      Color* color;
  
      private:
      int legs;
      float height;
  
      public:
      Chair(int legs, float height):legs(legs), height(height){
          color = new Color(255, 0 , 0);
      }
  
      void printChair(){
          cout &lt;&lt; "Legs: " &lt;&lt; getLegs() &lt;&lt; " , height: " &lt;&lt; getHeight() &lt;&lt; endl;
      }
  
      int getLegs() { return legs; }
      float getHeight(){ return height; }
  
      Chair&amp; operator+(Chair&amp; close_chair){
          this-&gt;legs += close_chair.getLegs();
          this-&gt;height += close_chair.getHeight();
          return *this;
      }
  
  };
  
  int main(){
       Chair my_chair(4, 1.32f);
       my_chair.*color.printColor();
       return 0;
  }
  </code></pre>
  
  <p>When i use my_chair.*color.printColor(); in main, i get 'color' : undeclared identifier. I run this example in Visual Studio. </p>
  
  <p>Thank you.</p>