title: C++: pass matrix of pointers by const reference
body: <p>My question is kinda simple and probably silly, but if I have a dynamic matrix like <code>int ** max</code> and I pass it to a function <code>calculateCost(int ** max, int n))</code>. </p>
  
  <p>My question is: how can I pass it as <code>const</code> reference?</p>