title: Virtual functions and polymorphism
body: <p>Suppose I have this:</p>
  
  <pre><code>class A
  {
      public:
      virtual int hello(A a);
  };
  
  class B : public A
  {
     public:
     int hello(B b){ bla bla };
  };
  </code></pre>
  
  <p>So, A it's an abstract class.</p>
  
  <p>1)In the class B, I'm defining a method that its suppose overrides the A class. But the parameter it's slightly different. I'm not sure about this, is this correct? Maybe because of polymorphism, this is ok but its rather confusing.
  2) If I do: A a = new B;, and then a.hello(lol);  if "lol" it's not of type B, then it would give compile error?, and if it's of type A from another class C (class C : public A), what would happend?</p>
  
  <p>I'm confused about the overriding and virtual thing.. all examples I found work with methods without parameters.</p>
  
  <p>Any answer, link, or whatever it's appreciated. </p>
  
  <p>thanks</p>
  
  <p>pd: sorry for my english</p>