title: what's the point to override a function without providing a definition?
body: <p>I am reading a snippet of code and surprised that the following code (as a minimal example) compiles, and compelled to ask is it legit to override a function without providing a function body? If yes, then is this an intentional design for some code logic by the code writer?</p>
  
  <pre><code>class Parent {
  public:
      virtual void func1(){std::cout&lt;&lt; "Parent" &lt;&lt; std::endl;};
  };
  
  
  class Child: public Parent {
  public:
     void func1() override; // override, without function body
  };
  
  int main(){
    Child c;
    // c.func1(); // the code compiles is this line is commented.
  }
  </code></pre>
  
  <p><strong>Reply to the comments</strong></p>
  
  <p>First thanks for a detailed explanation by Jerry Coffin.</p>
  
  <p>Although I feel a need to write something about the comments under the main post, I understand that it is generally that the definition of function is written in cpp file, and I indeed looked for the definition in the cpp file before posting here, my main concern about this code is that this code might be intentionally written in this way, yes, although there is linking error, but this linking error might be intended by the coder to hint that this function should not be called. I, as a junior developer in C++ which is known for its complexity, am genuinely asking if this thought is a well-recognized design.</p>