title: c++ class inheritance error C2509
body: <p>i have two classes
  first:
  .h file</p>
  
  <pre><code> #ifndef Vandenynas_H
  #define Vandenynas_H
  #include &lt;cstdlib&gt;
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  #include "skaicioti.h"
  using namespace std;
  
  class Vandenynas {
  public:
      void danne (int i,int a, int a0);
      void getdan();
      string GetName ();
  };
  #endif  
  </code></pre>
  
  <p>.cppfile</p>
  
  <pre><code>  #include &lt;cstdlib&gt;
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;sstream&gt;
  #include "Vandenynas.h"
  
  skaicioti::v vektorV;
  void Vandenynas::danne(int i,int a, int a0)
  { 
      switch (i)
      {
          case 0:
              vektorV.x=a-a0;
              break;
          case 1:
              vektorV.y=a-a0;
              break;
          default:
              vektorV.z=a-a0;
              break;
      }
  }
  </code></pre>
  
  <p>second:
  .h file</p>
  
  <pre><code>    #ifndef Zuvis_H
  #define Zuvis_H
  #include &lt;cstdlib&gt;
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;sstream&gt;
  #include "Vandenynas.h"
  class Zuvis:public Vandenynas
  {
  public:
      void plaukti();
  };
  #endif  
  </code></pre>
  
  <p>.cpp file</p>
  
  <pre><code>#include &lt;cstdlib&gt;
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;sstream&gt;
  
  #include "Zuvis.h"
  skaicioti::v vektorZ;
  void Zuvis::plaukti()
  {
      cout&lt;&lt;"plaukia\n";
  }
  void Zuvis::danne (int i,int a, int a0)
  {
          switch (i)
      {
          case 0:
              vektorZ.x=a-a0;
              break;
          case 1:
              vektorZ.y=a-a0;
              break;
          default:
              vektorZ.z=a-a0;
              break;
      }
  }
  </code></pre>
  
  <p>and when i compile i get error:
  zuvis.cpp(14) : error C2509: 'danne' : member function not declared in 'Zuvis'
  maybe someone can tell me where is my mistake?</p>