title: C++ pointer as return type from function
body: <p>I'm pretty new to programming in C++. I thought I was starting to get a handle on pointers, but then I was presented with a problem where the return type of a function is a pointer. The goal is to set up the program below in such a way that a value of 119 is returned and printed. I can't quite figure out the function definition of f4.</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int* f4(int param);
  
  int main()
  {
      cout &lt;&lt; f4(118);
      return 0;
  }
  
  int* f4(int parm)
  {
      //I don't know how to make this work
  }
  </code></pre>
  
  <p>*edit People are asking for more information. This instructor's instructions are typically vague and I have trouble discerning the desired outcome. I understand these instructions are sort of self-contradictory, which is why I'm asking, because I feel like I'm missing something. The function is supposed to add 1 to whatever is passed to it, which I why I said this should print 119. I pass 118 to the function, and the line cout &lt;&lt; f4(118) should print 119.</p>