title: c++ const member function that returns a const pointer.. But what type of const is the returned pointer?
body: <p>I apologize if this has been asked, but how do I create a member function in c++ that returns a pointer in the following scenerios:
  1. The returned pointer is constant, but the junk inside can be modified.
  2. The junk inside is constant but the returned pointer can be modified.
  3. Neither the junk, nor the pointer can be modified. </p>
  
  <p>Is it like so:</p>
  
  <ol>
  <li><code>int *const func() const</code><br></li>
  <li><code>const int* func() const</code></li>
  <li><code>const int * const func() const</code></li>
  </ol>
  
  <p>All of the tutorials I've read don't cover this distinction.</p>
  
  <p>Side note:
  If my method is declared const then the tutorials say that I'm stating that I won't modify the parameters.. But this is not clear enough for me in the case when a parameter is a pointer. Do my parameters need to be like:</p>
  
  <p>a. <code>void func(const int* const x) const;</code><br>
  b. <code>void func(const int* x) const;</code><br>
  c. <code>void func(const int* const x) const;</code></p>