title: Getting very long "No match for 'operator+'" error in C++
body: <p>I'm out of practice with C++ and am writing a "Bank" class for a course I'm taking.  I'm getting a long error every time I attempt to compile my Bank.cpp file.  I suspect I'm missing something quite obvious here, but I don't know what because the error doesn't make any sense to me.</p>
  
  <p>Here's the cpp file I'm writing that won't compile:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  #include "Bank.h"
  
  Bank::Bank(): savings(0), checking(0) { }
  
  Bank::Bank(double savings_amount, double checking_amount): savings(savings_amount), checking(checking_amount) { }
  
  void Bank::deposit(double amount, string account)
  {
          if (account == "S") {
                  savings = savings + amount;
          } else {
                  checking += amount;
          }
  }
  
  void Bank::withdraw(double amount, string account)
  {
          if (account == "S") {
                  savings -= amount;
          } else {
                  checking -= amount;
          }
  }
  
  void Bank::transfer(double amount, string account)
  {
          if (account == "S") {
                  savings -= amount;
                  checking += amount;
          } else {
              checking -= amount;
          }
  }
  
  void Bank::transfer(double amount, string account)
  {
          if (account == "S") {
                  savings -= amount;
                  checking += amount;
          } else {
                  checking -= amount;
                  savings += amount;
          }
  }
  
  void Bank::print_balances()
  {
          cout &lt;&lt; "Savings: $ " &lt;&lt; savings;
          cout &lt;&lt; "Checking: $ " &lt;&lt; checking;
  }
  </code></pre>
  
  <p>Here's the header file:</p>
  
  <pre><code>#ifndef BANK_H
  #define BANK_H
  
  #include &lt;string&gt;
  
  #include "Account.h"
  
  using namespace std;
  
  class Bank {
  private:
      Account savings;
      Account checking;
  public:
      Bank();
      Bank(double savings_amount, double checking_amount);
      void deposit(double amount, string account);
      void withdraw(double amount, string account);
      void transfer(double amount, string account);
      void print_balances();
  };
  
  #endif
  </code></pre>
  
  <p>And here's the "Account.h" header file that is referenced at the top:</p>
  
  <pre><code>#ifndef ACCOUNT_H
  #define ACCOUNT_H
  
  
  class Account {
  private:
      double balance;
      double interest_rate;
  public:
      Account();
      Account(double amount, double rate);
      void deposit(double);
      bool withdraw(double);
      double query();
      void set_interest_rate(double rate);
      double get_interest_rate();
      void add_interest();
  };
  
  #endif
  </code></pre>
  
  <p>And here is the cryptic error I'm receiving:</p>
  
  <blockquote>
    <p>Bank.cpp: In member function ‘void Bank::deposit(double, std::string)’:
    Bank.cpp:17: error: no match for ‘operator+’ in ‘((Bank*)this)->Bank::savings + amount’
    Bank.cpp:19: error: no match for ‘operator+=’ in ‘((Bank*)this)->Bank::checking += amount’
    Bank.cpp: In member function ‘void Bank::withdraw(double, std::string)’:
    Bank.cpp:26: error: no match for ‘operator-=’ in ‘((Bank*)this)->Bank::savings -= amount’
    Bank.cpp:28: error: no match for ‘operator-=’ in ‘((Bank*)this)->Bank::checking -= amount’
    Bank.cpp: In member function ‘void Bank::transfer(double, std::string)’:
    Bank.cpp:35: error: no match for ‘operator-=’ in ‘((Bank*)this)->Bank::savings -= amount’
    Bank.cpp:36: error: no match for ‘operator+=’ in ‘((Bank*)this)->Bank::checking += amount’
    Bank.cpp:38: error: no match for ‘operator-=’ in ‘((Bank*)this)->Bank::checking -= amount’
    Bank.cpp:39: error: no match for ‘operator+=’ in ‘((Bank*)this)->Bank::savings += amount’
    Bank.cpp: In member function ‘void Bank::print_balances()’:
    Bank.cpp:45: error: no match for ‘operator&lt;&lt;’ in ‘std::operator&lt;&lt; [with _Traits = std::char_traits](((std::basic_ostream >&amp;)(&amp; std::cout)), ((const char*)"Savings: $ ")) &lt;&lt; ((Bank*)this)->Bank::savings’
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:108: note: candidates are: std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(std::basic_ostream&lt;_CharT, _Traits>&amp; (<em>)(std::basic_ostream&lt;_CharT, _Traits>&amp;)) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:117: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(std::basic_ios&lt;_CharT, _Traits>&amp; (</em>)(std::basic_ios&lt;_CharT, _Traits>&amp;)) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:127: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(std::ios_base&amp; (<em>)(std::ios_base&amp;)) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:165: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:169: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long unsigned int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:173: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(bool) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/ostream.tcc:91: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(short int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:180: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(short unsigned int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/ostream.tcc:105: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:191: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(unsigned int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:200: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long long int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:204: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long long unsigned int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:209: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(double) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:213: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(float) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:221: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long double) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:225: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(const void</em>) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/ostream.tcc:119: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(std::basic_streambuf&lt;_CharT, _Traits><em>) [with _CharT = char, _Traits = std::char_traits]
    Bank.cpp:46: error: no match for ‘operator&lt;&lt;’ in ‘std::operator&lt;&lt; [with _Traits = std::char_traits](((std::basic_ostream >&amp;)(&amp; std::cout)), ((const char</em>)"Checking: $ ")) &lt;&lt; ((Bank*)this)->Bank::checking’
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:108: note: candidates are: std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(std::basic_ostream&lt;_CharT, _Traits>&amp; (<em>)(std::basic_ostream&lt;_CharT, _Traits>&amp;)) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:117: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(std::basic_ios&lt;_CharT, _Traits>&amp; (</em>)(std::basic_ios&lt;_CharT, _Traits>&amp;)) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:127: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(std::ios_base&amp; (<em>)(std::ios_base&amp;)) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:165: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:169: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long unsigned int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:173: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(bool) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/ostream.tcc:91: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(short int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:180: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(short unsigned int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/ostream.tcc:105: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:191: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(unsigned int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:200: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long long int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:204: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long long unsigned int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:209: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(double) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:213: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(float) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:221: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long double) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:225: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(const void</em>) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/ostream.tcc:119: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(std::basic_streambuf&lt;_CharT, _Traits><em>) [with _CharT = char, _Traits = std::char_traits]
    [004709613@jb359-5 Lab1]$ Bank.cpp: In member function ‘void Bank::deposit(double, std::string)’:
    -bash: syntax error near unexpected token <code>('
    [004709613@jb359-5 Lab1]$ Bank.cpp:17: error: no match for ‘operator+’ in ‘((Bank*)this)-&gt;Bank::savings + amount’
    -bash: syntax error near unexpected token</code>('
    [004709613@jb359-5 Lab1]$ Bank.cpp:19: error: no match for ‘operator+=’ in ‘((Bank</em>)this)->Bank::checking += amount’
    -bash: syntax error near unexpected token <code>('
    [004709613@jb359-5 Lab1]$ Bank.cpp: In member function ‘void Bank::withdraw(double, std::string)’:
    -bash: syntax error near unexpected token</code>('
    [004709613@jb359-5 Lab1]$ Bank.cpp:26: error: no match for ‘operator-=’ in ‘((Bank*)this)->Bank::savings -= amount’
    -bash: syntax error near unexpected token <code>('
    [004709613@jb359-5 Lab1]$ Bank.cpp:28: error: no match for ‘operator-=’ in ‘((Bank*)this)-&gt;Bank::checking -= amount’
    -bash: syntax error near unexpected token</code>('
    [004709613@jb359-5 Lab1]$ Bank.cpp: In member function ‘void Bank::transfer(double, std::string)’:
    -bash: syntax error near unexpected token <code>('
    [004709613@jb359-5 Lab1]$ Bank.cpp:35: error: no match for ‘operator-=’ in ‘((Bank*)this)-&gt;Bank::savings -= amount’
    -bash: syntax error near unexpected token</code>('
    [004709613@jb359-5 Lab1]$ Bank.cpp:36: error: no match for ‘operator+=’ in ‘((Bank*)this)->Bank::checking += amount’
    -bash: syntax error near unexpected token <code>('
    [004709613@jb359-5 Lab1]$ Bank.cpp:38: error: no match for ‘operator-=’ in ‘((Bank*)this)-&gt;Bank::checking -= amount’
    -bash: syntax error near unexpected token</code>('
    [004709613@jb359-5 Lab1]$ Bank.cpp:39: error: no match for ‘operator+=’ in ‘((Bank*)this)->Bank::savings += amount’
    -bash: syntax error near unexpected token <code>('
    [004709613@jb359-5 Lab1]$ Bank.cpp: In member function ‘void Bank::print_balances()’:
    -bash: syntax error near unexpected token</code>('
    [004709613@jb359-5 Lab1]$ Bank.cpp:45: error: no match for ‘operator&lt;&lt;’ in ‘std::operator&lt;&lt; [with _Traits = std::char_traits](((std::basic_ostream >&amp;)(&amp; std::cout)), ((const char*)"Savings: $ ")) &lt;&lt; ((Bank*)this)->Bank::savings’
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:108: note: candidates are: std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(std::basic_ostream&lt;_CharT, _Traits>&amp; (<em>)(std::basic_ostream&lt;_CharT, _Traits>&amp;)) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:117: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(std::basic_ios&lt;_CharT, _Traits>&amp; (</em>)(std::basic_ios&lt;_CharT, _Traits>&amp;)) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:127: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(std::ios_base&amp; (<em>)(std::ios_base&amp;)) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:165: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:169: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long unsigned int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:173: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(bool) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/ostream.tcc:91: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(short int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:180: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(short unsigned int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/ostream.tcc:105: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:191: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(unsigned int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:200: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long long int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:204: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long long unsigned int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:209: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(double) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:213: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(float) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:221: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long double) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:225: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(const void</em>) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/ostream.tcc:119: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(std::basic_streambuf&lt;_CharT, _Traits><em>) [with _CharT = char, _Traits = std::char_traits]
    Bank.cpp:46: error: no match for ‘operator&lt;&lt;’ in ‘std::operator&lt;&lt; [with _Traits = std::char_traits](((std::basic_ostream >&amp;)(&amp; std::cout)), ((const char</em>)"Checking: $ ")) &lt;&lt; ((Bank*)this)->Bank::checking’
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:108: note: candidates are: std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(std::basic_ostream&lt;_CharT, _Traits>&amp; (<em>)(std::basic_ostream&lt;_CharT, _Traits>&amp;)) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:117: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(std::basic_ios&lt;_CharT, _Traits>&amp; (</em>)(std::basic_ios&lt;_CharT, _Traits>&amp;)) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:127: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(std::ios_base&amp; (<em>)(std::ios_base&amp;)) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:165: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:169: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long unsigned int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:173: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(bool) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/ostream.tcc:91: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(short int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:180: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(short unsigned int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/ostream.tcc:105: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:191: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(unsigned int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:200: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long long int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:204: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long long unsigned int) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:209: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(double) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:213: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(float) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:221: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(long double) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ostream:225: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(const void</em>) [with _CharT = char, _Traits = std::char_traits]
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/ostream.tcc:119: note:                 std::basic_ostream&lt;_CharT, _Traits>&amp; std::basic_ostream&lt;_CharT, _Traits>::operator&lt;&lt;(std::basic_streambuf&lt;_CharT, _Traits>*) [with _CharT = char, _Traits = std::char_traits]</p>
  </blockquote>
  
  <p>Anyone know what I'm doing wrong?  I'm sure it's something pretty stupid. I can post the header file as well, but it's difficult to do so due to remote editing issues.</p>