title: where should friend functions be written?
body: <p>I have two friend functions in a class in a header file</p>
  <p>both of them are declared in the class</p>
  <p>but the problem is when I write their body in a .cpp file I get this error</p>
  <p><code> undefined reference to...</code></p>
  <p>and when I write the body in the .h file I get this error</p>
  <p><code> multiple definition of..</code></p>
  <p>so I don't understand where should I write the body of friend function?</p>