title: The whole class in header file without .cpp file
body: <p>I have been working a lot with Java, and C++ is right down confusing.</p>
  
  <p>In Java you have class files, at first I supposed it's the equivalent to header files in C++, like so:</p>
  
  <pre><code>#ifndef PROGRAM_H
  #define PROGRAM_H
  
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  
  class Program {
  private:
      std::string name, version, author;
  
  public:
      Program(std::string name, std::string version, std::string author) {
          this-&gt;name = name;
          this-&gt;version = version;
          this-&gt;author = author;
      }
  
      std::string toString() {
          return name + " " + version + " - by " + author + "\n";
      }
  
  } MainProgram("program", "2.0a", "foo bar");
  
  #endif
  </code></pre>
  
  <p>I've just read that I should separate my classes into two files, the header to define the class, and the .cpp to implement the class.</p>
  
  <p>Should I really do it to each class? because the header class above compiles just fine, and it seems too simple to really separate it to two files, perhaps maybe only large classes should be separated by convention? Any suggestions?</p>