title: An odd C++ error: test.cpp:15: error: passing ‘const *’ as ‘this’ argument of ‘*’ discards qualifiers
body: <p>I'm having some trouble with a particular piece of code, if anyone can enlighten me on this matter it would be greatly appreciated, I've isolated the problem down in the following sample:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  class testing{
     int test();
     int test1(const testing&amp; test2);
  };
  
  int testing::test(){
     return 1;
  }
  
  int testing::test1(const testing&amp; test2){
     test2.test();
     return 1;
  }
  </code></pre>
  
  <p>So what could possibly have cause the following error:</p>
  
  <p>test.cpp:15: error: passing ‘const testing’ as ‘this’ argument of ‘int testing::test()’ discards qualifiers</p>
  
  <p>Thanks a lot!</p>