title: Is it required to define the initialization list in a header file?
body: <p>Recently I created class <code>Square</code>:</p>
  
  <p>=========header file======</p>
  
  <pre><code>class Square
  {
      int m_row;
      int m_col;
  
  public:
      Square(int row, int col): m_row(row), m_col(col) 
  };
  </code></pre>
  
  <p>==========cpp file======</p>
  
  <pre><code>#include "Square.h"
  
  Square::Square(int row, int col)
  {
      cout &lt;&lt; "TEST";
  }
  </code></pre>
  
  <p>but then I receive lots of errors. If I remove the cpp file and change the header file to:</p>
  
  <p>=========header file======</p>
  
  <pre><code>class Square
  {
      int m_row;
      int m_col;
  
  public:
      Square(int row, int col): m_row(row), m_col(col) {};
  };
  </code></pre>
  
  <p>it complies with no errors. Does it mean that initialization list must appear in the header file?</p>