title: The correct way to define default argument for a friend function in C++
body: <p>I want to specify a default value for a friend function, as follows:</p>
  
  <p><code>friend Matrix rot90 (const Matrix&amp; a, int k = 1);</code></p>
  
  <p>When compiling this line with Xcode 5.1.1, I get the following error</p>
  
  <p><code>./Matrix.hh:156:19: error: friend declaration specifying a default argument must be a definition</code></p>
  
  <p>What is the proper way of fixing it?</p>
  
  <p>Thanks!</p>