title: keep getting " see declaration of 'class " error
body: <p>I have my code written but keep getting the following when I try and run it:</p>
  
  <pre><code>1&gt;------ Build started: Project: Project 2, Configuration: Debug Win32 ------
  1&gt;  Project 2.cpp
  1&gt;c:\users\geena\desktop\zaks stuff\project 2\project 2\project 2\account.h(6): error C2011: 'account' : 'class' type redefinition
  1&gt;          c:\users\geena\desktop\zaks stuff\project 2\project 2\project 2\account.h(6) : see declaration of 'account'
  1&gt;c:\users\geena\desktop\zaks stuff\project 2\project 2\project 2\checking.h(9): error C2504: 'account' : base class undefined
  1&gt;c:\users\geena\desktop\zaks stuff\project 2\project 2\project 2\creditcard.h(9): error C2504: 'account' : base class undefined
  1&gt;c:\users\geena\desktop\zaks stuff\project 2\project 2\project 2\saving.h(9): error C2504: 'account' : base class undefined
  1&gt;c:\users\geena\desktop\zaks stuff\project 2\project 2\project 2\project 2.cpp(45): error C2039: 'makeDeposit' : is not a member of 'saving'
  1&gt;          c:\users\geena\desktop\zaks stuff\project 2\project 2\project 2\saving.h(8) : see declaration of 'saving'
  1&gt;c:\users\geena\desktop\zaks stuff\project 2\project 2\project 2\project 2.cpp(59): error C2039: 'makeDeposit' : is not a member of 'checking'
  1&gt;          c:\users\geena\desktop\zaks stuff\project 2\project 2\project 2\checking.h(8) : see declaration of 'checking'
  1&gt;  Account.cpp
  1&gt;  Generating Code...
  1&gt;  Skipping... (no relevant changes detected)
  1&gt;  Saving.cpp
  1&gt;  CreditCard.cpp
  1&gt;  Checking.cpp
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>
  
  <p>I am not sure what any of these errors are or what I am doing wrong...</p>
  
  <p>Here is my Main():</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;sstream&gt;
  #include "Account.h"
  #include "Checking.h"
  #include "CreditCard.h"
  #include "Saving.h"
  
  using namespace std;
  
  int main ()
  {
      saving sa;
      creditCard cca;
      checking ca;
  
      string n;
      int option;
      int exit = 1;
      cout &lt;&lt; endl;
      cout &lt;&lt; "Checking Balance:" &lt;&lt; " " &lt;&lt; "          " &lt;&lt; "Savings balance:" &lt;&lt; " " &lt;&lt; "          " &lt;&lt; "Credit Card balance:" &lt;&lt; " " &lt;&lt; endl;
      cout &lt;&lt; endl;
      cout &lt;&lt; " (1) Savings Deposit " &lt;&lt; endl;
      cout &lt;&lt; " (2) Savings withdrawel " &lt;&lt; endl;
      cout &lt;&lt; " (3) Checking Deposit " &lt;&lt; endl;
      cout &lt;&lt; " (4) Write A Check " &lt;&lt; endl;
      cout &lt;&lt; " (5) Credit Card Payment " &lt;&lt; endl;
      cout &lt;&lt; " (6) Make A Charge " &lt;&lt; endl;
      cout &lt;&lt; " (7) Display Savings " &lt;&lt; endl;
      cout &lt;&lt; " (8) Display Checkings " &lt;&lt; endl;
      cout &lt;&lt; " (9) Display Credit Card " &lt;&lt; endl;
      cout &lt;&lt; " (0) Exit " &lt;&lt; endl;
      cin &gt;&gt; option;
  
      do{
  
      switch ( option )
  
      {
          case 1 : {
                   double SamtD;
                   cout &lt;&lt; " Please enter how much you would like to deposit into savings " &lt;&lt; endl;
                   cin &gt;&gt; SamtD;
                   sa.makeDeposit(SamtD);
                   break;
                   }
          case 2 : {
                   double SamtW;
                   cout &lt;&lt; " Please enter how much you would like to withdrawel "&lt;&lt; endl;
                   cin &gt;&gt; SamtW;
                   sa.doWithdraw(SamtW);
                   break;
                   }
          case 3 : {
                   double CamtD;
                   cout &lt;&lt; " Please enter how much you would like to deposit into checkings " &lt;&lt; endl;
                   cin &gt;&gt; CamtD;
                   ca.makeDeposit(CamtD);
                   break;
                   }
          case 4 : {
                   double CamtW;
                   int chkNum;
                   cout &lt;&lt; " Please enter how much you wrote on the check " &lt;&lt; endl;
                   cin &gt;&gt; CamtW;
                   cout &lt;&lt; " Please enter the check number " &lt;&lt; endl;
                   cin &gt;&gt; chkNum;
                   ca.writeCheck(chkNum, CamtW);
                   break;
                   }
          case 5 : {
                   double CCmkP;
                   cout &lt;&lt; " Please enter the amount you would like to deposit " &lt;&lt; endl;
                   cin &gt;&gt; CCmkP;
                   cca.makePayment(CCmkP);
                   break;
                   }
          case 6 : {
                   double DoC;
                   string Nm;
                   cout &lt;&lt; " Please enter the amount charged to your credit card " &lt;&lt; endl;
                   cin &gt;&gt; DoC;
                   cout &lt;&lt; " Please enter where the charge was made " &lt;&lt; endl;
                   getline(cin, Nm);
                   cca.doCharge(Nm,DoC);
                   break;
                   }
          case 7 : {
                   sa.display();
                   break;
                   }
          case 8 : {
                   ca.display();
                   break;
                   }
          case 9 : {
                   cca.display();
                   break;
                   }
          case 0 : exit = 0;
                   break;
          default : exit = 0;
                   cout &lt;&lt; " ERROR ";
      }
      }
      while(exit==1);
      return 0;
  }
  </code></pre>
  
  <p>Here is the class saving.h(very similar to checking and creditcard so I assume they are related issues :</p>
  
  <pre><code>#include "stdafx.h"
  #include "iostream"
  #include "Account.h"
  #include &lt;string&gt;
  #include &lt;sstream&gt;
  using namespace std;
  
  class saving: public account
  {
  public :
  
      double doWithdraw(double amount);
      string display();
      saving();
      saving(string itsName, long itsTaxID, double itsBalance);
  };
  </code></pre>
  
  <p>This is the .cpp file for saving :</p>
  
  <pre><code>#include "stdafx.h"
  #include "iostream"
  #include "Saving.h"
  #include &lt;string&gt;
  #include &lt;sstream&gt;
  using namespace std;
  
  saving::saving():account()
  {
  }
  
  saving::saving(string itsName, long itsTaxID, double itsBalance): account(itsName, itsTaxID, itsBalance)
  {
  }
  
  double saving:: doWithdraw(double amount)
  {
      return 0;
  }
  </code></pre>
  
  <p>and here is the base class account.h. saving checking and creditcard inherit from this class :</p>
  
  <pre><code>#include "stdafx.h"
  #include "iostream"
  #include &lt;string&gt;
  #include &lt;sstream&gt;
  using namespace std;
  class account {
  
  public :
      void setName(string name); void setTaxID(long taxID); void setBalance(double balance);
      string getName(); long getTaxID(); double getBalance();
      double makeDeposit( double amount );
      account();
      account(string itsName, long itsTaxID, double itsBalance);
      int display();
  
  private :
      string itsName;
      long itsTaxID;
      double itsBalance;
  
  protected :
      double last10withdraws[10];
      double last10deposits[10];
      int numdeposits;
      int numwithdraws;
  
  };
  </code></pre>
  
  <p>and the account.cpp :</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;iostream&gt;
  #include "Account.h"
  #include &lt;string&gt;
  #include &lt;sstream&gt;
  
  using namespace std;
  
  account::account():itsName(""), itsTaxID(0), itsBalance(0)
  {
  }
  
  account::account(string itsName, long itsTaxID, double itsBalance): itsName(), itsTaxID(), itsBalance()
  {
  }
  
  void account::setName(string name)
  {
      itsName = name;
  }
  
  string account::getName()
  {
      return itsName;
  }
  
  void account::setTaxID(long taxID)
  {
      itsTaxID = taxID;
  }
  
  long account::getTaxID()
  {
      return itsTaxID;
  }
  
  void account::setBalance(double balance)
  {
      balance = 100;
      itsBalance = balance;
  }
  
  double account::getBalance()
  {
      return itsBalance;
  }
  
  double account::makeDeposit( double amount )
  {
      return amount;
  }
  
  int account::display()
  {
      return 0;
  }
  </code></pre>
  
  <p>Any idea why I keep getting these errors? It just makes no sense to me .</p>