title: How to access a dynamic object property not using getter method?
body: <pre><code>#include &lt;iostream&gt;
  
  class SomeClass
  {
   public: int *SomeNumber;
  
   SomeClass() { SomeNumber = new int; *SomeNumber = 5; }
  
   ~SomeClass() { delete SomeNumber; }
   int getSomeNumber(void) { return *SomeNumber; }
  
  };
  
  int main()
  {
  
  SomeClass A;
  std:: cout &lt;&lt; A.getSomeNumber() &lt;&lt; std::endl; // outputs 5
  std:: cout &lt;&lt; A.SomeNumber &lt;&lt; std::endl; // outputs SomeNumber address
  
  return 0;
  }
  </code></pre>
  
  <p>How can I get *SomeNumber, not its address, by not using the method getSomeNumber()? If SomeNumber were not a pointer to a int, I could get it with A.SomeNumber</p>
  
  <p>Sorry If I were not clear enough.
  Thanks in advance.</p>