title: Why should I not include cpp files and instead use a header?
body: <p>So I finished my first C++ programming assignment and received my grade. But according to the grading, I lost marks for <code>including cpp files instead of compiling and linking them</code>. I'm not too clear on what that means.</p>
  
  <p>Taking a look back at my code, I chose not to create header files for my classes, but did everything in the cpp files (it seemed to work fine without header files...). I'm guessing that the grader meant that I wrote '#include "mycppfile.cpp";' in some of my files. </p>
  
  <p>My reasoning for <code>#include</code>'ing the cpp files was: 
  - Everything that was supposed to go into the header file was in my cpp file, so I pretended it was like a header file
  - In monkey-see-monkey do fashion, I saw that other header files were <code>#include</code>'d in the files, so I did the same for my cpp file.</p>
  
  <p>So what exactly did I do wrong, and why is it bad?</p>