title: C++ Accessors - should I return a pointer to the member variable or the actual member variable itself?
body: <p>I have what is hopefully a simple question here.  For my member variables of my classes, all of which are private, should I use accessors to return a pointer or return the variable itself?  Or should I be doing something else?</p>
  
  <p>Example:</p>
  
  <pre><code>unsigned int *Object::GetObjectIDPointer()
  {
      return &amp;objectID;
  }
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>unsigned int Object::GetObjectID()
  {
      return objectID;
  }
  </code></pre>