title: Is it better to keep functions in header files or source files
body: <p>Is it better to keep functions in header files and include them into the main source file, or to keep functions in source files and link them in the main source file?</p>
  <p>Some libraries keep functions in their separate source files which are declared in a special header file. When you include that header file in your main source files, you link all of those functions. However, it creates an object files for each of those source files (doesn't it?). I'm thinking wouldn't it be more efficient to keep function in header files that are all included in a special header file?</p>
  <p>Including functions</p>
  <pre><code>#include &lt;foo.h&gt;
  #include &lt;boo.h&gt;
  
  int main() {
  
  }
  </code></pre>
  <p>Linking functions</p>
  <pre><code>int foo();
  int boo();
  
  int main() {
  
  }
  </code></pre>