title: C++: Const correctness and pointer arguments
body: <p>I understand that a const pointer can be declared a couple ways:</p>
  
  <pre><code>const int * intPtr1; // Declares a pointer that cannot be changed.
  int * const intPtr2; // Declares a pointer whose contents cannot be changed.
  
  // EDIT: THE ABOVE CLAIMS ARE INCORRECT, PLEASE READ THE ANSWERS.
  </code></pre>
  
  <p>But what about the same principles within the context of function arguments?</p>
  
  <p>I would assume that the following is redundant:</p>
  
  <pre><code>void someFunc1(const int * arg);
  void someFunc2(int * arg);
  </code></pre>
  
  <p>Since someFunc 1 and 2 do a pass-by-value for the pointer itself, its impossible for someFunc1 to change the value of the original pointer, in a given call to the function. To illustrate:</p>
  
  <pre><code>int i = 5;
  int * iPtr = &amp;i;
  
  someFunc1(iPtr); // The value of iPtr is copied in and thus cannot be changed by someFunc1.
  </code></pre>
  
  <p>If these are true, then there is no point in ever declaring a function with a 'const int * ptr' type arg, correct?</p>