title: C++ : forbid a class to change the value pointed to by a pointer member variable
body: <p>I apologize if the title sounds abstruse, let me make that simple with an example :</p>
  
  <pre><code>class A
  {
  public:
      A(int *flag) : flag_(flag) {}
      void foo();
  private:
      void bar();
      int *flag_;
  };
  </code></pre>
  
  <p>The question is: can I prevent this class from changing the value pointed to by flag_?</p>
  
  <p>Note : I'm thinking, maybe I want to write something like <code>const int * flag_</code>, but I do not want to make the value pointed to by <code>flag</code> "irrevocably" constant. In my case, this value is the value of some member variable of some other class, which can be changed.</p>
  
  <p>Thanks for your insights!</p>