title: Writing function definition in header files in C++
body: <p>I have a class which has many small functions. By small functions, I mean functions that doesn't do any processing but just return a literal value. Something like:</p>
  
  <pre><code>string Foo::method() const{
      return "A";
  }
  </code></pre>
  
  <p>I have created a header file "Foo.h" and source file "Foo.cpp". But since the function is very small, I am thinking about putting it in the header file itself. I have the following questions:</p>
  
  <ol>
  <li>Is there any performance or other issues if I put these function definition in header file? I will have many functions like this.</li>
  <li>My understanding is when the compilation is done, compiler will expand the header file and place it where it is included. Is that correct?</li>
  </ol>