title: Should a virtual c++ method implementation in .cpp file be marked virtual?
body: <p>I have a virtual C++ method that I'm defining in a .h file and implementing in a .cc file.  Should the implementation in the .cc file be marked virtual, or just the declaration in the .h file?  E.g., my header has:</p>
  
  <pre><code>virtual std::string toString() const;
  </code></pre>
  
  <p>The method is implemented in my .cc:</p>
  
  <pre><code>std::string
  MyObject::toString() const {
     [implementation code]
  }
  </code></pre>
  
  <p>Should the implementation be marked virtual, or is the above code OK?  Does it matter?</p>