title: How do I return the value pointed to by a pointer?
body: <p>I have a class member defined as: </p>
  
  <pre><code>someType* X;
  </code></pre>
  
  <p>and I get it like:</p>
  
  <pre><code>someType* getX() {return x;}
  </code></pre>
  
  <p>I would like to get the value rather than the pointer i.e.:</p>
  
  <pre><code>someType getX() {return x;} //this is wrong
  </code></pre>
  
  <p>what is the proper syntax for this? How do I get the value rather than the pointer?</p>