title: C++ : Assign normal return value to a pointer
body: <p>How do I assign a normal return value of a function to a pointer?</p>
  
  <p>For example, I want to assign the return value of this <code>static</code> member function:</p>
  
  <pre><code>int AnotherClass::getInt();
  </code></pre>
  
  <p>In the following expression :</p>
  
  <pre><code>// m_ipA is a private member of the class `Class`
  int *m_ipA;
  // Lots of things in between, then :
  void Class::printOutput() {
      m_ipA = AnotherClass::getInt();
      // Some operations on m_iPA here, then
      // Print instructions here
  }
  </code></pre>
  
  <p>Do I need to initialize <code>m_ipA</code> with the <code>new</code> keyword in the constructor?</p>
  
  <p>Thanks in advance.</p>