title: Error: expected unqualified-id before 'bool'
body: <p>I am a beginner attempting the last c++ exercise problem in this link: <a href="http://www.cplusplus.com/forum/articles/12974/" rel="nofollow">http://www.cplusplus.com/forum/articles/12974/</a>
  It's called Graduation.
  After starting to code it, I decided to separate a class definition into a header file. (keep in mind this if the first time I have ever defined my own header file. ever) I tried to define a member function of the header file class in main.cpp, but returns an error.</p>
  
  <p>Here is the operator function definition that gives the error: </p>
  
  <pre><code>//in main.cpp
  Bunny::bool operator&gt;(const Bunny &amp;comparison) //ERROR!!! expected unqualified-id before 'bool'
  {
      if (badbunny == false &amp;&amp; comparison-&gt;badbunny == true)
          return true;
      if (badbunny == true &amp;&amp; comparison-&gt;badbunny == false)
          return false;
      else if (badbunny == comparison-&gt;badbunny) {
      //......blah..blah..blah....nothing special here
  }
  </code></pre>
  
  <p>Here is the header class definition:</p>
  
  <pre><code>//in Bunny class.h
  class Bunny
  {
  public:
      const char * name;
      const char * color;
      int age;
      char sex;
      bool badbunny;
      Bunny *next;
      //default constructor
      Bunny();
      Bunny(char * M_color);
      //operators
      bool operator&lt;(const Bunny &amp;comparison);
      bool operator&gt;(const Bunny &amp;comparison);
  };
  </code></pre>
  
  <p>However, when I type the class definition (and some other declarations from the header file that I didn't type here) straight into main.cpp and don't bother with any header files, my compiler doesn't give me any errors.
  As you can see, "bool operator>(const Bunny &amp;comparison);" is clearly declared in the header file. Why can I not access it from main.cpp?
  I clearly #include'd "Bunny class.h" in main.cpp, and the header file has a guard and everything.</p>