title: Can i override non virtual function in c++
body: <p>i wanna know can i override non virtual function in c++ because i found this problem when playing with c++
  <strong>override</strong> keyword i have the code as follows</p>
  <pre><code>class A
  {
  public:
      void say()
      {
          cout &lt;&lt; &quot;From A\n&quot;;
      }
  };
  class B : public A {
  public:
      void say()
          override
      {
          cout &lt;&lt; &quot;From B\n&quot;;
      }
  };
  </code></pre>
  <p>but when i execute the code visual studio display the following error<br />
  <strong>'B::say': method with override specifier 'override' did not override any base class methods</strong>
  but when i used virtual keyword in class A then error gone and code runs perfectly</p>