title: "Virtual" and Header Files
body: <p>I have Foo.hpp and Foo.cpp, i'd like to define a virtual function </p>
  
  <pre><code>virtual void setValue(int val){
  }
  </code></pre>
  
  <p>Would the following implementation be correct:</p>
  
  <p><strong>Foo.hpp</strong></p>
  
  <pre><code>#ifndef _FOO
  #define _FOO
  class Foo{
    public:
      Foo();
      virtual void setValue(int val);
  };
  #endif
  </code></pre>
  
  <p><strong>Foo.cpp</strong></p>
  
  <pre><code>Foo::setValue(){
  
  }
  </code></pre>
  
  <p>I realise it would be easier if i kept it to one file, but this is just a simplification of a more complex structure.</p>